We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1147 - Mouse enter/leave events broken in fullscreen mode
Summary: Mouse enter/leave events broken in fullscreen mode
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: events (show other bugs)
Version: HG 2.0
Hardware: x86 Mac OS X 10.6
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-23 13:15 UTC by Vern Jensen
Modified: 2011-03-09 16:17 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vern Jensen 2011-02-23 13:15:19 UTC
Version: SDL 1.3.0-5390

When fullscreen, I am getting mouse enter/leave events *as if* the window were still the size it was when in windowed mode. 

For instance, if I started up with a 1000x750 window, then switch to fullscreen at 1680x1050, if I move the mouse to the right of pixel 1000, I get a "mouse left window" event, and if I move it above pixel 300 (1050-750), same thing.

It seems that the coordinates from mouse motion events are being reported properly though. It's just that SDL_WINDOWEVENT_ENTER and SDL_WINDOWEVENT_LEAVE are confused when fullscreen.
Comment 1 Vern Jensen 2011-02-23 14:29:35 UTC
UPDATE -- 

I just realized this bug ONLY happens if you *first* start up in windowed mode, and then switch to fullscreen later with SDL_SetWindowFullscreen.

If you set the fullscreen flag when first creating the SDL window, this but does not happen. 

Still a bug that needs fixing though, as I'll let the user specify if he wants to startup in fullscreen or not, and he can also switch at any time.
Comment 2 Sam Lantinga 2011-02-24 18:13:36 UTC
I think this is fixed in the latest snapshot by this revision:
http://hg.libsdl.org/SDL/rev/109b7c071f70

Thanks!
Comment 3 Vern Jensen 2011-03-09 16:17:03 UTC
Yes, fixed also. :-)