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 348

Summary: X11 relative mouse motion vs grabbing cursor outside of window...
Product: SDL Reporter: Ryan C. Gordon <icculus>
Component: eventsAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED DUPLICATE QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: 1.2.11   
Hardware: x86   
OS: Linux   

Description Ryan C. Gordon 2006-10-18 01:11:13 UTC
(X11 driver only?)

Mouse motion events will only give endless relative values if mouse is hidden and grabbed when system cursor is in the SDL window. If the input is grabbed when the system cursor is outside the window, it'll only give relative motion events until it hits the edge of the window, and then no events will fire until the mouse rolls back in the opposite direction.

Easiest reproduction case: build program from here:

   http://www.libsdl.org/pipermail/sdl/2006-October/076927.html

Start program, hit 'u' to ungrab the mouse, move it outside the window, and hit 'g' to regrab it. Watch mouse motion information on stdout, and how it clamps to window dimensions. Hit 'u' again and then 'g' while cursor is still inside the window and see that the absolute motion values still clamp to the window but the relative ones can go indefinitely in any direction.

--ryan.
Comment 1 rasz 2006-10-23 04:50:10 UTC
dupe of http://bugzilla.libsdl.org/show_bug.cgi?id=299 ?
Comment 2 Ryan C. Gordon 2006-10-23 05:13:17 UTC
Yeah, dupe.

--ryan.



*** This bug has been marked as a duplicate of 299 ***