From f0196356a8856fd7e3bbc7b568d1f50b2ed88997 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 20 May 2013 12:25:16 -0700 Subject: [PATCH] Fixed losing ALT key modifiers on Unity --- src/video/x11/SDL_x11events.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/video/x11/SDL_x11events.c b/src/video/x11/SDL_x11events.c index 757abd93c..318c2947b 100644 --- a/src/video/x11/SDL_x11events.c +++ b/src/video/x11/SDL_x11events.c @@ -356,7 +356,13 @@ X11_DispatchEvent(_THIS) /* We want to reset the keyboard here, because we may have missed keyboard messages after our previous FocusOut. */ - SDL_ResetKeyboard(); + /* Actually, if we do this we clear the ALT key on Unity + because it briefly takes focus for their dashboard. + + I think it's better to think the ALT key is held down + when it's not, then always lose the ALT modifier on Unity. + */ + /*SDL_ResetKeyboard();*/ } data->pending_focus = PENDING_FOCUS_IN; data->pending_focus_time = SDL_GetTicks() + PENDING_FOCUS_IN_TIME;