mirror of
https://github.com/glfw/glfw.git
synced 2026-01-11 15:23:17 +01:00
Wayland: Fix GLFW_DECORATED for XDG decorations
On a compositor that supports server-side decorations, they were always enabled in windowed mode, even if GLFW_DECORATED was cleared.
This commit is contained in:
@@ -635,9 +635,15 @@ static GLFWbool createShellObjects(_GLFWwindow* window)
|
||||
zxdg_toplevel_decoration_v1_add_listener(window->wl.xdg.decoration,
|
||||
&xdgDecorationListener,
|
||||
window);
|
||||
zxdg_toplevel_decoration_v1_set_mode(
|
||||
window->wl.xdg.decoration,
|
||||
ZXDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE);
|
||||
|
||||
uint32_t mode;
|
||||
|
||||
if (window->decorated)
|
||||
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
|
||||
createFallbackDecorations(window);
|
||||
|
||||
Reference in New Issue
Block a user