We don't always get the focus change events. Argh!
authorSam Lantinga <slouken@libsdl.org>
Fri, 28 Sep 2012 02:15:44 -0700
changeset 6488 7b2f712bdf1a
parent 6487 b18a011ecc45
child 6489 31449ea8f934
We don't always get the focus change events. Argh!
src/video/x11/SDL_x11window.c
--- a/src/video/x11/SDL_x11window.c	Fri Sep 28 01:51:51 2012 -0700
+++ b/src/video/x11/SDL_x11window.c	Fri Sep 28 02:15:44 2012 -0700
@@ -1238,8 +1238,8 @@
 
         /* flush these events so they don't confuse normal event handling */
         XSync(display, False);
-        XIfEvent(display, &ev, &isFocusIn, (XPointer)&data->xwindow);
-        XIfEvent(display, &ev, &isFocusOut, (XPointer)&data->xwindow);
+        XCheckIfEvent(display, &ev, &isFocusIn, (XPointer)&data->xwindow);
+        XCheckIfEvent(display, &ev, &isFocusOut, (XPointer)&data->xwindow);
     } else {
         XUngrabPointer(display, CurrentTime);
         XUngrabKeyboard(display, CurrentTime);