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 1165

Summary: SDL_GetMouseState() returns wrong location after switch to/from fullscreen
Product: SDL Reporter: Vern Jensen <vern>
Component: eventsAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: minor    
Priority: P2    
Version: HG 2.0   
Hardware: x86   
OS: Mac OS X 10.6   

Description Vern Jensen 2011-03-09 16:09:44 UTC
If you switch from windowed mode to fullscreen, or back, the cursor's location within the window will be different. Yet, SDL_GetMouseState() continues to return the old (incorrect) mouse location from prior to the switch. This continues until the user moves the mouse, at which point it instantly correctly itself to the correct location, and works properly from them on out.

Version: SDL-1.3.0-5445

Most other mouse stuff seems to be working -- great work!!
Comment 1 Sam Lantinga 2011-03-11 18:25:27 UTC
I'm solving this by moving the mouse to the correct location after a fullscreen mode switch:
http://hg.libsdl.org/SDL/rev/5c4635640bf9

Thanks!