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 38

Summary: Bad mouse coordinates on mouse down in windowed mode
Product: SDL Reporter: Ilya Olevsky <info>
Component: eventsAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: 1.2.9   
Hardware: x86   
OS: Windows (All)   

Description Ilya Olevsky 2006-01-09 23:27:12 UTC
I'm using SDL 1.2.9 with Visual C++ 7.0 on Windows 2000.

Here's the setup: my game starts in a window, with SDL_WM_GrabInput(SDL_GRAB_ON) to constrain the cursor to the game window. The mouse cursor is outside of the window when the game launches, and when the window appears the cursor is grabbed and placed at the top left corner of the inside of the game window. At this point, if I click the mouse without moving it, the SDL_MOUSEBUTTONDOWN event's mouse coordinates are (65535,65535).
Comment 1 Ryan C. Gordon 2006-01-27 11:23:11 UTC
Setting Sam as "QA Contact" on all bugs (even resolved ones) so he'll definitely be in the loop to any further discussion here about SDL.

--ryan.

Comment 2 Sam Lantinga 2006-03-14 01:00:49 UTC
Fixed in CVS, thanks!