Browse Source

wayland: Only dispatch on fullscreen set when the window is visible.

Fixes hang-on-startup described in #4572.
Ethan Lee 4 years ago
parent
commit
7082fb04af
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/video/wayland/SDL_waylandwindow.c

+ 1 - 1
src/video/wayland/SDL_waylandwindow.c

@@ -962,7 +962,7 @@ Wayland_SetWindowFullscreen(_THIS, SDL_Window * window,
      *
      *
      * -flibit
      * -flibit
      */
      */
-    if (viddata->shell.libdecor) {
+    if (viddata->shell.libdecor && (window->flags & SDL_WINDOW_SHOWN)) {
         WAYLAND_wl_display_dispatch(viddata->display);
         WAYLAND_wl_display_dispatch(viddata->display);
     }
     }
 #endif
 #endif