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

On Windows, confine cursor to center of window when grabbed and hidden #3562

Merged
merged 1 commit into from
Mar 18, 2024

Conversation

fornwall
Copy link
Contributor

@fornwall fornwall commented Mar 3, 2024

This fixes issues where a hidden and grabbed cursor could leave the window and become visible on top of the windows taskbar (and potentially leave the window altogether if the taskbar is clicked) under at least two occasions:

  • When a window is overlapping the taskbar.
  • When a window is maximized and Automatically hide the taskbar has been enabled.

This approach of confining the cursor to the center of the window is used in SDL.

  • Tested on all platforms changed
  • Added an entry to CHANGELOG.md if knowledge of this change could be valuable to users
  • Updated documentation to reflect any user-facing changes, including notes of platform-specific behavior
  • Created or updated an example program if it would help users understand this functionality
  • Updated feature matrix, if new features were added or implemented

CHANGELOG.md Outdated Show resolved Hide resolved
src/changelog/unreleased.md Outdated Show resolved Hide resolved
@fornwall fornwall requested a review from kchibisov March 17, 2024 08:04
This fixes issues where a hidden and grabbed cursor could leave the
window and become visible on top of the windows taskbar (and potentially
leave the window altogether if the taskbar is clicked) under at least
two occasions:

    - When a window is overlapping the taskbar.
    - When a window is maximized and Automatically hide the taskbar has
      been enabled.

This approach of confining the cursor to the center of the window is
used in SDL.
@kchibisov kchibisov merged commit ba10c35 into rust-windowing:master Mar 18, 2024
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

4 participants