From 2dc9006711d070c057827bf5330842b66b5db924 Mon Sep 17 00:00:00 2001
From: Frank Praznik <[EMAIL REDACTED]>
Date: Wed, 17 Jun 2026 19:01:16 -0400
Subject: [PATCH] wayland: External windows are never hidden
Needed for the GPU renderer to function properly.
(cherry picked from commit dbfddb640952413fd26a3708cddb3b61e1682e65)
---
src/video/wayland/SDL_waylandwindow.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/video/wayland/SDL_waylandwindow.c b/src/video/wayland/SDL_waylandwindow.c
index f939dd1bf9802..027e090af5e54 100644
--- a/src/video/wayland/SDL_waylandwindow.c
+++ b/src/video/wayland/SDL_waylandwindow.c
@@ -2859,6 +2859,11 @@ bool Wayland_CreateWindow(SDL_VideoDevice *_this, SDL_Window *window, SDL_Proper
// Roleless and external surfaces are always considered to be in the shown state by the backend.
data->shell_surface_type = WAYLAND_SHELL_SURFACE_TYPE_CUSTOM;
data->shell_surface_status = WAYLAND_SHELL_SURFACE_STATUS_SHOWN;
+
+ // External windows are presumed to be shown.
+ if (window->flags & SDL_WINDOW_EXTERNAL) {
+ window->flags &= ~SDL_WINDOW_HIDDEN;
+ }
}
if (SDL_GetHintBoolean(SDL_HINT_VIDEO_DOUBLE_BUFFER, false)) {