We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 5516 - [PATCH] Handle keys already down when keyboard grab starts
Summary: [PATCH] Handle keys already down when keyboard grab starts
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: events (show other bugs)
Version: HG 2.0
Hardware: x86 Windows 10
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-29 02:08 UTC by Cameron Gutman
Modified: 2021-01-29 16:49 UTC (History)
0 users

See Also:


Attachments
Patch (2.79 KB, patch)
2021-01-29 02:10 UTC, Cameron Gutman
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Cameron Gutman 2021-01-29 02:08:18 UTC
For keys that are already down when we install the keyboard hook, we need to allow the WM_KEYUP/WM_SYSKEYUP message to be processed normally. This ensures that other applications see the key up, which prevents the key from being stuck down from the perspective of other apps when our grab is released.
Comment 2 Sam Lantinga 2021-01-29 16:49:42 UTC
Patch added, thanks!
https://hg.libsdl.org/SDL/rev/53ea3e992e58