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 - X11 relative mouse motion vs grabbing cursor outside of window...
Summary: X11 relative mouse motion vs grabbing cursor outside of window...
Status: RESOLVED DUPLICATE of bug 299
Alias: None
Product: SDL
Classification: Unclassified
Component: events (show other bugs)
Version: 1.2.11
Hardware: x86 Linux
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-18 01:11 UTC by Ryan C. Gordon
Modified: 2006-10-23 05:13 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***