1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-26 12:18:51 -05:00

Wayland: Fix toggling of server-side decorations

This is a temporary local fix to have updates to GLFW_DECORATED mostly
work as intended.  The whole decoration state machine needs to be
restructured, but not by this commit.
This commit is contained in:
Camilla Löwy 2022-06-13 19:37:34 +02:00
parent c28d420060
commit 229d628ec4
2 changed files with 19 additions and 3 deletions

View File

@ -346,6 +346,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
- [POSIX] Removed use of deprecated function `gettimeofday`
- [POSIX] Bugfix: `CLOCK_MONOTONIC` was not correctly tested for or enabled
- [WGL] Disabled the DWM swap interval hack for Windows 8 and later (#1072)

View File

@ -2097,12 +2097,26 @@ void _glfwSetWindowResizableWayland(_GLFWwindow* window, GLFWbool enabled)
}
void _glfwSetWindowDecoratedWayland(_GLFWwindow* window, GLFWbool enabled)
{
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
{
if (enabled)
createDecorations(window);
else
destroyDecorations(window);
}
}
void _glfwSetWindowFloatingWayland(_GLFWwindow* window, GLFWbool enabled)
{