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

Fixes to some relative mouse mode bugs. #546

Closed
SDLBugzilla opened this issue Feb 10, 2021 · 0 comments
Closed

Fixes to some relative mouse mode bugs. #546

SDLBugzilla opened this issue Feb 10, 2021 · 0 comments

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: HG 2.0
Reported for operating system, platform: Mac OS X 10.7, x86

Comments on the original bug report:

On 2012-02-07 16:13:28 +0000, Wim wrote:

Created attachment 816
The patches

Some patches to fix some problems I found using relative mouse mode.

The first is simply fixing a crash when disabling relative mouse mode without the mouse being over an SDL window, since the cursor was not being controlled by SDL we don't need to bother warping it around.

The second moves some of the low level cursor control from the window manager to the mouse manager. I'm not entirely certain this is correct, but I believe when the cursor is outside an SDL window it should be rendered with the default look, while saving what look it had for when the window is re-entered.

The reason behind this change was the cursor was not being hidden/unhidden when relative mode was enabled/disabled with the mouse outside any SDL window.

The third change saves the current x, y co-ordinates when relative mode is entered and then restores them when relative mode is disabled. I'm pretty sure this was the intended behavior of the warp.

I've generated the patches using hg export, if there's some better way to generate them just let me know.

On 2012-02-20 21:03:52 +0000, Sam Lantinga wrote:

These look good, and I've imported them into the main SDL repository.
Thanks!

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

No branches or pull requests

1 participant