SDL2/0006-wayland-Call-SetFullscreen-directly-in-ShowWindow.patch
Neal Gompa 737aec8a5b Backport Wayland fixes with Wayland-by-default from upstream
Resolves: rhbz#2051963

Signed-off-by: Neal Gompa <ngompa@centosproject.org>
2022-02-08 07:39:03 -05:00

29 lines
1.3 KiB
Diff

From f0e768da43173cf62732fc20d1f80eb777d6d5c8 Mon Sep 17 00:00:00 2001
From: Ethan Lee <flibitijibibo@gmail.com>
Date: Tue, 25 Jan 2022 13:07:00 -0500
Subject: [PATCH 06/11] wayland: Call SetFullscreen directly in ShowWindow.
This cuts out an extra flush when getting the first configure event.
---
src/video/wayland/SDL_waylandwindow.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/video/wayland/SDL_waylandwindow.c b/src/video/wayland/SDL_waylandwindow.c
index 2bf500a91..d4b89de7a 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);
--
2.34.1