Skip to content

Release mouse if config -set mouse_capture=nomouse is executed #3129

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

Merged
merged 1 commit into from
Nov 17, 2023

Conversation

FeralChild64
Copy link
Collaborator

@FeralChild64 FeralChild64 commented Nov 16, 2023

Description

Fixes a problem with config -set mouse_capture=nomouse command when mouse is captured, now the mouse is released (uncaptured) immediately now - I believe this is the most sane behavior.

Related issues

Fixes #3127

Manual testing

  • make sure DOSBox Staging is in windowed (not fullscreen) mode
  • capture the mouse (depending on configuration - usually middle click inside the window works)
  • execute command config -set mouse_capture=nomouse - mouse should be released
  • execute command config -set mouse_capture=onclick - mouse shouldn't get auto-captured again

Checklist

I have:

  • followed the project's contributing guidelines and code of conduct.
  • performed a self-review of my code.
  • commented on the particularly hard-to-understand areas of my code.
  • split my work into well-defined, bisectable commits, and I named my commits well.
  • applied the appropriate labels (bug, enhancement, refactoring, documentation, etc.)
  • checked that all my commits can be built.
  • confirmed that my code does not cause performance regressions (e.g., by running the Quake benchmark).
  • added unit tests where applicable to prove the correctness of my code and to avoid future regressions.
  • made corresponding changes to the documentation or the website according to the documentation guidelines.
  • locally verified my website or documentation changes.

@FeralChild64 FeralChild64 added the bug Something isn't working label Nov 16, 2023
@FeralChild64 FeralChild64 self-assigned this Nov 16, 2023
@FeralChild64 FeralChild64 changed the title [DRAFT, still testing] Release mouse if 'config -set mouse_capture=nomouse' is executed [DRAFT, still testing] Release mouse if config -set mouse_capture=nomouse is executed Nov 16, 2023
Copy link
Member

@kcgen kcgen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, @rderooy!
Nice quick fix, @FeralChild64 🚀

@FeralChild64 FeralChild64 changed the title [DRAFT, still testing] Release mouse if config -set mouse_capture=nomouse is executed Release mouse if config -set mouse_capture=nomouse is executed Nov 16, 2023
@FeralChild64 FeralChild64 marked this pull request as ready for review November 16, 2023 21:33
@FeralChild64 FeralChild64 merged commit 2f3c894 into main Nov 17, 2023
@FeralChild64 FeralChild64 deleted the fc/nomouse-fix-1 branch November 17, 2023 22:44
@johnnovak johnnovak added the input handling Issues related to handling any input (keyboard, mouse, joystick & game controllers) label Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working input handling Issues related to handling any input (keyboard, mouse, joystick & game controllers)
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Mouse lost after mouse_capture=nomouse
3 participants