2
0
Эх сурвалжийг харах

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.
Camilla Löwy 3 жил өмнө
parent
commit
c05acf6246
1 өөрчлөгдсөн 8 нэмэгдсэн , 0 устгасан
  1. 8 0
      src/wl_window.c

+ 8 - 0
src/wl_window.c

@@ -644,6 +644,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;
 }