src/video/x11/SDL_x11window.c
changeset 6488 7b2f712bdf1a
parent 6487 b18a011ecc45
child 6500 c532b3fdce27
equal deleted inserted replaced
6487:b18a011ecc45 6488:7b2f712bdf1a
  1236         XGrabKeyboard(display, data->xwindow, True, GrabModeAsync,
  1236         XGrabKeyboard(display, data->xwindow, True, GrabModeAsync,
  1237                       GrabModeAsync, CurrentTime);
  1237                       GrabModeAsync, CurrentTime);
  1238 
  1238 
  1239         /* flush these events so they don't confuse normal event handling */
  1239         /* flush these events so they don't confuse normal event handling */
  1240         XSync(display, False);
  1240         XSync(display, False);
  1241         XIfEvent(display, &ev, &isFocusIn, (XPointer)&data->xwindow);
  1241         XCheckIfEvent(display, &ev, &isFocusIn, (XPointer)&data->xwindow);
  1242         XIfEvent(display, &ev, &isFocusOut, (XPointer)&data->xwindow);
  1242         XCheckIfEvent(display, &ev, &isFocusOut, (XPointer)&data->xwindow);
  1243     } else {
  1243     } else {
  1244         XUngrabPointer(display, CurrentTime);
  1244         XUngrabPointer(display, CurrentTime);
  1245         XUngrabKeyboard(display, CurrentTime);
  1245         XUngrabKeyboard(display, CurrentTime);
  1246     }
  1246     }
  1247 }
  1247 }