From 0d39d090767e466deba63bb4c1dfe11a276b682e Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 10 Nov 2013 14:33:01 -0800 Subject: [PATCH] Hopefully fixed focus problems when handling a global hotkey on X11. See this thread for details: https://bugzilla.mozilla.org/show_bug.cgi?id=578265 --- src/video/x11/SDL_x11events.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/video/x11/SDL_x11events.c b/src/video/x11/SDL_x11events.c index afee2345f..f7090dd0c 100644 --- a/src/video/x11/SDL_x11events.c +++ b/src/video/x11/SDL_x11events.c @@ -408,6 +408,13 @@ X11_DispatchEvent(_THIS) /* Losing input focus? */ case FocusOut:{ + if (xevent.xfocus.mode == NotifyGrab) { + /* Someone is handling a global hotkey, ignore it */ +#ifdef DEBUG_XEVENTS + printf("window %p: FocusOut (NotifyGrab, ignoring)\n", data); +#endif + break; + } if (xevent.xfocus.detail == NotifyInferior) { /* We still have focus if a child gets focus */ #ifdef DEBUG_XEVENTS