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 1149

Summary: Mouse motion and enter/leave events ignore window's title bar after going from fullscreen to windowed
Product: SDL Reporter: Vern Jensen <vern>
Component: eventsAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 2.0   
Hardware: x86   
OS: Mac OS X 10.6   

Description Vern Jensen 2011-02-23 14:48:29 UTC
There is a new problem in SDL 1.3.0-5390 with mouse entered/leave and motion events being reported when the cursor is in the window's title bar, if you switched from fullscreen to windowed mode. This happens both if starting up fullscreen from the get-go, and then switching to windowed mode, as well as starting up in windowed mode, and then switching to fullscreen and back.

The problem is that after switching from fullscreen to windowed mode, I get

SDL_WINDOWEVENT_ENTER
and
SDL_MOUSEMOTION

events when the mouse is moved into the window's title bar. This shouldn't be. You should have to move the mouse *below* the title bar (into the window's content area) for the "mouse entered" event to happen. Same for mouse motion. Internally, it seems like SDL has a "window title bar height of 0" set somewhere when the window is made fullscreen., and this doesn't get fixed when switching back to windowed mode.
Comment 1 Sam Lantinga 2011-02-24 18:13:50 UTC
I think this is fixed in the latest snapshot by this revision:
http://hg.libsdl.org/SDL/rev/109b7c071f70

Thanks!
Comment 2 Vern Jensen 2011-03-09 16:17:56 UTC
Also fixed. Great work!
Comment 3 Sam Lantinga 2011-03-09 16:24:48 UTC
Great, thanks! :)