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

Summary: [PATCH] Fix grab of Alt+Tab and Alt+Esc on Windows 7
Product: SDL Reporter: Cameron Gutman <cameron.gutman>
Component: eventsAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 2.0   
Hardware: x86   
OS: Windows 10   
Attachments: Patch

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