Browse Source

wayland: Ensure that the main queue is dispatched when showing a libdecor window

There is no guarantee that libdecor will always dispatch the main queue (a future plugin may run on its own queue), so ensure that the main queue is still dispatched when showing a libdecor window, as is already the case when pumping events.
Frank Praznik 2 months ago
parent
commit
41039b44ac
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/video/wayland/SDL_waylandwindow.c

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

@@ -2028,6 +2028,7 @@ void Wayland_ShowWindow(SDL_VideoDevice *_this, SDL_Window *window)
         if (data->shell_surface.libdecor.frame) {
         if (data->shell_surface.libdecor.frame) {
             while (data->shell_surface_status == WAYLAND_SHELL_SURFACE_STATUS_WAITING_FOR_CONFIGURE) {
             while (data->shell_surface_status == WAYLAND_SHELL_SURFACE_STATUS_WAITING_FOR_CONFIGURE) {
                 libdecor_dispatch(c->shell.libdecor, -1);
                 libdecor_dispatch(c->shell.libdecor, -1);
+                WAYLAND_wl_display_dispatch_pending(c->display);
             }
             }
         }
         }
     } else
     } else