Commit f0e768da43173cf62732fc20d1f80eb777d6d5c8

Ethan Lee 2022-01-25T13:07:00

wayland: Call SetFullscreen directly in ShowWindow. This cuts out an extra flush when getting the first configure event.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/src/video/wayland/SDL_waylandwindow.c b/src/video/wayland/SDL_waylandwindow.c
index 2bf500a..d4b89de 100644
--- a/src/video/wayland/SDL_waylandwindow.c
+++ b/src/video/wayland/SDL_waylandwindow.c
@@ -778,8 +778,8 @@ void Wayland_ShowWindow(_THIS, SDL_Window *window)
          * libdecor will call this as part of their configure event!
          * -flibit
          */
-        Wayland_SetWindowFullscreen(_this, window, SDL_GetDisplayForWindow(window),
-                                    (window->flags & SDL_WINDOW_FULLSCREEN) != 0);
+        SDL_WaylandOutputData *odata = SDL_GetDisplayForWindow(window)->driverdata;
+        SetFullscreen(window, (window->flags & SDL_WINDOW_FULLSCREEN) ? odata->output : NULL);
         if (data->shell_surface.xdg.surface) {
             while (!data->shell_surface.xdg.initial_configure_seen) {
                 WAYLAND_wl_display_flush(c->display);