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 5503 - [PATCH] Fix grab of Alt+Tab and Alt+Esc on Windows 7
Summary: [PATCH] Fix grab of Alt+Tab and Alt+Esc on Windows 7
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-26 00:46 UTC by Cameron Gutman
Modified: 2021-01-26 02:56 UTC (History)
0 users

See Also:


Attachments
Patch (899 bytes, patch)
2021-01-26 00:46 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-26 00:46:12 UTC
Windows 7 behaves differently than Windows 10 with respect to how task switching keys like Alt+Tab and Alt+Esc are handled with SDL_HINT_KEYBOARD_GRAB=1.

On Windows 10, it's sufficient to just hook processing of VK_LMENU and VK_RMENU for Alt+Tab and Alt+Esc to be captured. On Windows 7, we also need to hook VK_TAB and VK_ESCAPE.
Comment 1 Cameron Gutman 2021-01-26 00:46:38 UTC
Created attachment 4704 [details]
Patch
Comment 2 Sam Lantinga 2021-01-26 02:56:32 UTC
Patch added, thanks!
https://hg.libsdl.org/SDL/rev/b7d624971a6f