injectMouseMove over non-CEGUI windows

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

User avatar
osb1842
Just popping in
Just popping in
Posts: 7
Joined: Tue May 03, 2005 17:29
Location: Monterey, CA
Contact:

injectMouseMove over non-CEGUI windows

Postby osb1842 » Thu Aug 17, 2006 18:17

Hello. First off the platform info: Windows XP, VS7.1, CEGUI 0.4.1 (same problem appears in 0.5.0rc2) w/ Producer+Delta3D

I am having issues with CEGUI::Syste::injectMouseMove (as well as injectMousePosition). My Windows are setup such that I have a FrameWindow covering the top 20% of the full Producer window. There are no CEGUI Windows below the FrameWindow and thus, it renders the 3D scene from Delta3D.

As I move the Producer mouse cursor (from Delta3D) ove the entire window, I am calling injectMouseMove and injectMousePosition. The return value of these functions make perfect sense when over the CEGUI FrameWindow (false if over the title bar, and true over buttons). However, as I mouse the cursor over the non-CEGUI region of my window, the inject function continue to return true.

This causes a major problem in our engine since I need to handle mouse behavior differently if CEGUI has processes the input events or not. After stepping through a bit of CEGUI::System::injectMoveMove, it appears that getTargetWindow(ma.position) is returning Windows (such as the TitleBar or FrameWindow itself) when the mouse is clearly not over those Windows. My only guess is that getTargetWindow returns the last active Window if the position is found to not be over any Window. I guess that would make sense since there is no other Window in the 3D view to click on and make active, so the last Window remains active.

Is this a bug in CEGUI, or is there a way I can make Windows deactivate when I move the mouse cursor off them?

Thank you.

Return to “Help”

Who is online

Users browsing this forum: No registered users and 20 guests