Browse Source

Fix window size in X11 when window manager refuses to resize

Le Philousophe 2 years ago
parent
commit
a67ae8eed5
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/video/x11/SDL_x11window.c

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

@@ -997,6 +997,10 @@ void X11_SetWindowSize(_THIS, SDL_Window *window)
         }
 
         if (SDL_GetTicks() >= timeout) {
+            /* Timeout occurred and window size didn't change
+             * wwindow manager likely denied the resize. */
+            window->w = orig_w;
+            window->h = orig_h;
             break;
         }