Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
We don't always get the focus change events. Argh!
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Sep 28, 2012
1 parent cdacf56 commit 49e5ff4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/video/x11/SDL_x11window.c
Expand Up @@ -1238,8 +1238,8 @@ X11_SetWindowGrab(_THIS, SDL_Window * window)

/* 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);
Expand Down

0 comments on commit 49e5ff4

Please sign in to comment.