浏览代码

Wayland: Cleanup

This moves what is effectively showing the window to where that is done
on other platforms, i.e. last in the platform CreateWindow function.
Camilla Löwy 3 年之前
父节点
当前提交
74b4ceb835
共有 1 个文件被更改,包括 6 次插入6 次删除
  1. 6 6
      src/wl_window.c

+ 6 - 6
src/wl_window.c

@@ -749,12 +749,6 @@ static GLFWbool createNativeSurface(_GLFWwindow* window,
     if (!window->wl.transparent)
         setContentAreaOpaque(window);
 
-    if (window->monitor || wndconfig->visible)
-    {
-        if (!createShellObjects(window))
-            return GLFW_FALSE;
-    }
-
     return GLFW_TRUE;
 }
 
@@ -1839,6 +1833,12 @@ GLFWbool _glfwCreateWindowWayland(_GLFWwindow* window,
     if (wndconfig->mousePassthrough)
         _glfwSetWindowMousePassthroughWayland(window, GLFW_TRUE);
 
+    if (window->monitor || wndconfig->visible)
+    {
+        if (!createShellObjects(window))
+            return GLFW_FALSE;
+    }
+
     return GLFW_TRUE;
 }