From 658c9315618aee1ecac2839a9e90d2008fa21e73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Tue, 28 Dec 2021 01:20:19 +0100 Subject: [PATCH] Wayland: Fix window not visible after initial swap A window created with GLFW_VISIBLE set was not made visible by the initial buffer swap during context attribute refresh. Regression introduced by @elmindreda in 094aa6d3c721397825cb1095c156353463ecafb5. (cherry picked from commit c05acf6246eefb08533dc3955db7eac9d2d1c0ec) --- src/wl_window.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/wl_window.c b/src/wl_window.c index 09b120a9..c73a2cf9 100644 --- a/src/wl_window.c +++ b/src/wl_window.c @@ -760,6 +760,14 @@ static GLFWbool createSurface(_GLFWwindow* window, if (!window->wl.transparent) setOpaqueRegion(window); + if (wndconfig->visible) + { + if (!createXdgSurface(window)) + return GLFW_FALSE; + + window->wl.visible = GLFW_TRUE; + } + return GLFW_TRUE; }