Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDL_CaptureMouse stops reporting relative movements at desktop edge #2385

Closed
SDLBugzilla opened this issue Feb 11, 2021 · 0 comments · Fixed by #4832
Closed

SDL_CaptureMouse stops reporting relative movements at desktop edge #2385

SDLBugzilla opened this issue Feb 11, 2021 · 0 comments · Fixed by #4832

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: 2.0.5
Reported for operating system, platform: Windows (All), All

Comments on the original bug report:

On 2017-01-30 12:00:21 +0000, Matthew wrote:

Created attachment 2692
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.

On 2017-04-10 14:02:12 +0000, Matthew wrote:

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

On 2017-06-02 15:31:43 +0000, Matthew wrote:

My patch is 5 Months now. If there is something I can do to help expedite this process just reply to my comment.

Thanks.

On 2017-08-11 19:54:12 +0000, Sam Lantinga wrote:

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,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant