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 3573 - SDL_CaptureMouse stops reporting relative movements at desktop edge
Summary: SDL_CaptureMouse stops reporting relative movements at desktop edge
Status: ASSIGNED
Alias: None
Product: SDL
Classification: Unclassified
Component: events (show other bugs)
Version: 2.0.5
Hardware: All Windows (All)
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-30 12:00 UTC by Matthew
Modified: 2017-08-11 19:54 UTC (History)
0 users

See Also:


Attachments
Proposed Patch (5.59 KB, patch)
2017-01-30 12:00 UTC, Matthew
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew 2017-01-30 12:00:21 UTC
Created attachment 2692 [details]
Proposed Patch

With SDL_CaptureMouse set, once the mouse hit the edge of the desktop no further relative movements are registered.

copied from here: https://bugzilla.libsdl.org/show_bug.cgi?id=3550#c4
"My use case is a 3D tool designed to work alongside other tools and apps. For this reason relative mouse mode is out of the question, as the cursor disappears and the mouse is locked to the window until you alt tab or close the window. To move the camera around you click and drag with the various mouse buttons. To continue getting mouse movements outside the window, I turn on SDL_CaptureMouse while a mouse button is being held down. This gets most of the way to what we want, however when the mouse hits the edge of the desktop no more relative movement events fire for mouse motion that would take the cursor past the bounds of the desktop, so the camera stops moving."

To get around this issue i've made a patch where SDL_CaptureMouse will report relative mouse movements all the time.

The patch will only make this behaviour occur on windows. All other platforms should have the same behaviour they have always had.
Comment 1 Matthew 2017-04-10 14:02:12 UTC
Hi.

Has anyone had a look at this patch? Its been 3 months since I submit it. I'm willing to make any adjustments to the implementation of the patch if required.

It would be great to get this solved if possible.

Thanks
Comment 2 Matthew 2017-06-02 15:31:43 UTC
My patch is 5 Months now. If there is something I can do to help expedite this process just reply to my comment.

Thanks.
Comment 3 Sam Lantinga 2017-08-11 19:54:12 UTC
Hi Matthew, thank you for your patch. There's nothing wrong it per se, we're just trying to decide whether this is an appropriate behavior change, especially since it's not implemented across all platforms.

I think we're going to leave it here for now and consider it for a future release.

Cheers,