Page 1 of 1

injectMouseMove over non-CEGUI windows

Posted: Thu Aug 17, 2006 18:17
by osb1842
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.