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

fix: Fix full-screen toggling repeatedly while holding Alt + Enter #2593

Merged
merged 1 commit into from
Feb 1, 2025

Conversation

ClamEater14
Copy link
Contributor

@ClamEater14 ClamEater14 commented Jan 13, 2025

PR Details

This PR fixes the full-screen toggle being activated repeatedly while holding the Alt + Enter key combination. The fix involves checking if the key combination was not already held down by ensuring the previous key state flag (aka KF_REPEAT) in the LParam of the Windows message is 0.

With the fix applied, one can toggle full screen only by pressing Enter (down and up) while holding Alt.

See documentation on the WM_SYSKEYDOWN message (including the LParam details I mentioned) here: https://learn.microsoft.com/en-us/windows/win32/inputdev/wm-syskeydown#remarks

Related Issue

Fixes #1530

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My change requires a change to the documentation.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have built and run the editor to try this change out.

@ClamEater14
Copy link
Contributor Author

@dotnet-policy-service agree

@Eideren
Copy link
Collaborator

Eideren commented Feb 1, 2025

Works great, thanks for looking into this one and sorry about the delay !

@Eideren Eideren merged commit 0053db2 into stride3d:master Feb 1, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Holding Alt-Enter keeps switching from/to full screen forever until released
2 participants