| Summary: | Fixes to some relative mouse mode bugs. | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Wim <ghostunderscore> |
| Component: | video | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | ghostunderscore |
| Version: | HG 2.0 | ||
| Hardware: | x86 | ||
| OS: | Mac OS X 10.7 | ||
| Attachments: | The patches | ||
These look good, and I've imported them into the main SDL repository. Thanks! |
Created attachment 816 [details] 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.