diff --git a/README.md b/README.md index 8de71cc2..0ecbcab3 100644 --- a/README.md +++ b/README.md @@ -165,6 +165,8 @@ information on what to include when reporting a bug. - [Wayland] Bugfix: Manual resizing with fallback decorations behaved erratically (#1991,#2115,#2127) - [Wayland] Bugfix: Size limits included frame size for fallback decorations + - [Wayland] Bugfix: Updating `GLFW_DECORATED` had no effect on server-side + decorations ## Contact diff --git a/src/wl_window.c b/src/wl_window.c index cc948114..ef5e7a02 100644 --- a/src/wl_window.c +++ b/src/wl_window.c @@ -2161,10 +2161,24 @@ void _glfwPlatformSetWindowResizable(_GLFWwindow* window, GLFWbool enabled) void _glfwPlatformSetWindowDecorated(_GLFWwindow* window, GLFWbool enabled) { - if (enabled) - createDecorations(window); + if (window->wl.xdg.decoration) + { + uint32_t mode; + + if (enabled) + mode = ZXDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE; + else + mode = ZXDG_TOPLEVEL_DECORATION_V1_MODE_CLIENT_SIDE; + + zxdg_toplevel_decoration_v1_set_mode(window->wl.xdg.decoration, mode); + } else - destroyDecorations(window); + { + if (enabled) + createDecorations(window); + else + destroyDecorations(window); + } } void _glfwPlatformSetWindowFloating(_GLFWwindow* window, GLFWbool enabled)