mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 13:04:35 +00: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.
(cherry picked from commit f35e2274cb
)
This commit is contained in:
parent
8f9ddfe3c2
commit
17959aad33
@ -180,6 +180,8 @@ information on what to include when reporting a bug.
|
|||||||
- [Wayland] Bugfix: `glfwRestoreWindow` had no effect before first show
|
- [Wayland] Bugfix: `glfwRestoreWindow` had no effect before first show
|
||||||
- [Wayland] Bugfix: Hiding and then showing a window caused program abort on
|
- [Wayland] Bugfix: Hiding and then showing a window caused program abort on
|
||||||
wlroots compositors (#1268)
|
wlroots compositors (#1268)
|
||||||
|
- [Wayland] Bugfix: `GLFW_DECORATED` was ignored when showing a window with XDG
|
||||||
|
decorations
|
||||||
|
|
||||||
|
|
||||||
## Contact
|
## Contact
|
||||||
|
@ -678,9 +678,15 @@ static GLFWbool createShellObjects(_GLFWwindow* window)
|
|||||||
zxdg_toplevel_decoration_v1_add_listener(window->wl.xdg.decoration,
|
zxdg_toplevel_decoration_v1_add_listener(window->wl.xdg.decoration,
|
||||||
&xdgDecorationListener,
|
&xdgDecorationListener,
|
||||||
window);
|
window);
|
||||||
zxdg_toplevel_decoration_v1_set_mode(
|
|
||||||
window->wl.xdg.decoration,
|
uint32_t mode;
|
||||||
ZXDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE);
|
|
||||||
|
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
|
else
|
||||||
createFallbackDecorations(window);
|
createFallbackDecorations(window);
|
||||||
|
Loading…
Reference in New Issue
Block a user