Blame 0006-wayland-Call-SetFullscreen-directly-in-ShowWindow.patch

adf5181
From f0e768da43173cf62732fc20d1f80eb777d6d5c8 Mon Sep 17 00:00:00 2001
adf5181
From: Ethan Lee <flibitijibibo@gmail.com>
adf5181
Date: Tue, 25 Jan 2022 13:07:00 -0500
adf5181
Subject: [PATCH 06/11] wayland: Call SetFullscreen directly in ShowWindow.
adf5181
adf5181
This cuts out an extra flush when getting the first configure event.
adf5181
---
adf5181
 src/video/wayland/SDL_waylandwindow.c | 4 ++--
adf5181
 1 file changed, 2 insertions(+), 2 deletions(-)
adf5181
adf5181
diff --git a/src/video/wayland/SDL_waylandwindow.c b/src/video/wayland/SDL_waylandwindow.c
adf5181
index 2bf500a91..d4b89de7a 100644
adf5181
--- a/src/video/wayland/SDL_waylandwindow.c
adf5181
+++ b/src/video/wayland/SDL_waylandwindow.c
adf5181
@@ -778,8 +778,8 @@ void Wayland_ShowWindow(_THIS, SDL_Window *window)
adf5181
          * libdecor will call this as part of their configure event!
adf5181
          * -flibit
adf5181
          */
adf5181
-        Wayland_SetWindowFullscreen(_this, window, SDL_GetDisplayForWindow(window),
adf5181
-                                    (window->flags & SDL_WINDOW_FULLSCREEN) != 0);
adf5181
+        SDL_WaylandOutputData *odata = SDL_GetDisplayForWindow(window)->driverdata;
adf5181
+        SetFullscreen(window, (window->flags & SDL_WINDOW_FULLSCREEN) ? odata->output : NULL);
adf5181
         if (data->shell_surface.xdg.surface) {
adf5181
             while (!data->shell_surface.xdg.initial_configure_seen) {
adf5181
                 WAYLAND_wl_display_flush(c->display);
adf5181
-- 
adf5181
2.34.1
adf5181