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