From 405d1f6598f8460c6f1ab671fe5f13e9462ae883 Mon Sep 17 00:00:00 2001
From: Sebastian Krzyszkowiak <[EMAIL REDACTED]>
Date: Sun, 24 Jul 2022 10:16:20 +0200
Subject: [PATCH] video: wayland: Roundtrip after falling back to libdecor in
xdg-decoration handler
Otherwise libdecor doesn't have a chance to acquire xdg-toplevel after
libdecor_new before we attempt to use it in Wayland_ShowWindow.
Fixes #5952
---
src/video/wayland/SDL_waylandwindow.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/video/wayland/SDL_waylandwindow.c b/src/video/wayland/SDL_waylandwindow.c
index 6560bdd78a3..25771753825 100644
--- a/src/video/wayland/SDL_waylandwindow.c
+++ b/src/video/wayland/SDL_waylandwindow.c
@@ -734,6 +734,7 @@ handle_configure_zxdg_decoration(void *data,
/* libdecor isn't available, so no borders for you... oh well */
return;
}
+ WAYLAND_wl_display_roundtrip(driverdata->waylandData->display);
SDL_HideWindow(window);
driverdata->shell_surface_type = WAYLAND_SURFACE_LIBDECOR;
SDL_ShowWindow(window);