We don't always get the focus change events. Argh!
This commit is contained in:
parent
e6a0c63fb7
commit
43674fabab
1 changed files with 2 additions and 2 deletions
|
@ -1238,8 +1238,8 @@ X11_SetWindowGrab(_THIS, SDL_Window * window)
|
||||||
|
|
||||||
/* flush these events so they don't confuse normal event handling */
|
/* flush these events so they don't confuse normal event handling */
|
||||||
XSync(display, False);
|
XSync(display, False);
|
||||||
XIfEvent(display, &ev, &isFocusIn, (XPointer)&data->xwindow);
|
XCheckIfEvent(display, &ev, &isFocusIn, (XPointer)&data->xwindow);
|
||||||
XIfEvent(display, &ev, &isFocusOut, (XPointer)&data->xwindow);
|
XCheckIfEvent(display, &ev, &isFocusOut, (XPointer)&data->xwindow);
|
||||||
} else {
|
} else {
|
||||||
XUngrabPointer(display, CurrentTime);
|
XUngrabPointer(display, CurrentTime);
|
||||||
XUngrabKeyboard(display, CurrentTime);
|
XUngrabKeyboard(display, CurrentTime);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue