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

ALT+TAB on Windows 7 with Aero theme doesn't release ALT key modifier state #671

Closed
SDLBugzilla opened this issue Feb 10, 2021 · 0 comments
Labels
invalid This doesn't seem right

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

Reported in version: HG 2.0
Reported for operating system, platform: Windows 7, All

Comments on the original bug report:

On 2012-09-24 22:12:57 +0000, wrote:

On Windows 7 with an Aero theme enabled, if you ALT+TAB out of an SDL2 application, the ALT modifier state (KMOD_LALT is what I used) stays on.

Upon focus gain, (SDL_GetModState() & KMOD_ALT) will always return true.

This is problematic if you wish to capture the ALT key in the application for some purpose (ALT + ENTER to resize), because it thinks the ALT key is already pressed and you may cause an undesired action.

The workaround is to do something like this in the even loop:

case SDL_WINDOWEVENT_FOCUS_LOST:
SDL_SetModState(KMOD_NONE);
break;

This does not occur on Windows XP, or Windows 7 with Aero turned off.

On 2013-05-22 17:33:17 +0000, wrote:

This bug appears to be gone as of hg rev 53df899db00b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

1 participant