Commit 7082fb04af66367cd23f2fe083034db587612c46

Ethan Lee 2021-08-02T22:42:28

wayland: Only dispatch on fullscreen set when the window is visible. Fixes hang-on-startup described in #4572.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/video/wayland/SDL_waylandwindow.c b/src/video/wayland/SDL_waylandwindow.c
index 49db037..29823e2 100644
--- a/src/video/wayland/SDL_waylandwindow.c
+++ b/src/video/wayland/SDL_waylandwindow.c
@@ -962,7 +962,7 @@ Wayland_SetWindowFullscreen(_THIS, SDL_Window * window,
      *
      * -flibit
      */
-    if (viddata->shell.libdecor) {
+    if (viddata->shell.libdecor && (window->flags & SDL_WINDOW_SHOWN)) {
         WAYLAND_wl_display_dispatch(viddata->display);
     }
 #endif