From b67b6ea683c5b35914c462c8f5e038075d300fef Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Wed, 3 Oct 2012 19:02:46 -0700 Subject: [PATCH] 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 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/video/x11/SDL_x11modes.c b/src/video/x11/SDL_x11modes.c index a81c4bd32..657d01724 100644 --- a/src/video/x11/SDL_x11modes.c +++ b/src/video/x11/SDL_x11modes.c @@ -740,6 +740,10 @@ X11_SetDisplayMode(_THIS, SDL_VideoDisplay * sdl_display, SDL_DisplayMode * mode 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 */