Added a delay hack to let the window manager adjust to the mode change. I'm not sure if this is a good idea, but at least it works sometimes now. :)
authorSam Lantinga <slouken@libsdl.org>
Wed, 03 Oct 2012 19:02:46 -0700
changeset 6549 db16b819e1d1
parent 6548 fc9e6be24ca9
child 6550 191f00a080ba
Added a delay hack to let the window manager adjust to the mode change. I'm not sure if this is a good idea, but at least it works sometimes now. :)
src/video/x11/SDL_x11modes.c
--- a/src/video/x11/SDL_x11modes.c	Wed Oct 03 18:56:29 2012 -0700
+++ b/src/video/x11/SDL_x11modes.c	Wed Oct 03 19:02:46 2012 -0700
@@ -740,6 +740,10 @@
             SDL_SetError("XRRSetCrtcConfig failed");
             return -1;
         }
+
+        /* Hack to let the window manager adjust to the mode change */
+        const int WINDOW_MANAGER_DELAY_HACK = 250;
+        SDL_Delay(WINDOW_MANAGER_DELAY_HACK);
     }
 #endif /* SDL_VIDEO_DRIVER_X11_XRANDR */