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 654

Summary: SDL SVN 1.3 2008-12-09, win32 platform, mouse coordinates calculated incorrectly in windowed mode
Product: SDL Reporter: Andrew <arahome>
Component: eventsAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: blocker    
Priority: P2    
Version: HG 2.0   
Hardware: x86   
OS: Windows (All)   

Description Andrew 2008-12-10 01:30:05 UTC
Mouse coordinates in windowed mode calculated incorrectly.
Instead of be relative to window content it occurs as screen (desktop) coordinates.

Fast woraround is change SDL_win32events.c and add at line 245 after:
  GetCursorPos(&point);
new line with contents:
  ScreenToClient(hwnd, &point);

This converts screen coordinates back to local.
Comment 1 Sam Lantinga 2009-01-02 22:07:37 UTC
Fixed, thanks!

Committed revision 4328.