Pārlūkot izejas kodu

x11: call XSync before XSetInputFocus during SDL_ShowWindow.

This only happens when using a non-NET_WM window manager, as we might try to
set the focus before the window is mapped.

Fixes #3949.
Ryan C. Gordon 4 gadi atpakaļ
vecāks
revīzija
9c063468d6
1 mainītis faili ar 1 papildinājumiem un 0 dzēšanām
  1. 1 0
      src/video/x11/SDL_x11window.c

+ 1 - 0
src/video/x11/SDL_x11window.c

@@ -1158,6 +1158,7 @@ X11_ShowWindow(_THIS, SDL_Window * window)
 
     if (!data->videodata->net_wm) {
         /* no WM means no FocusIn event, which confuses us. Force it. */
+        X11_XSync(display, False);
         X11_XSetInputFocus(display, data->xwindow, RevertToNone, CurrentTime);
         X11_XFlush(display);
     }