mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 13:04:35 +00: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.
(cherry picked from commit 229d628ec4
)
This commit is contained in:
parent
e04a7d152a
commit
8b26801a30
@ -165,6 +165,8 @@ information on what to include when reporting a bug.
|
|||||||
- [Wayland] Bugfix: Manual resizing with fallback decorations behaved erratically
|
- [Wayland] Bugfix: Manual resizing with fallback decorations behaved erratically
|
||||||
(#1991,#2115,#2127)
|
(#1991,#2115,#2127)
|
||||||
- [Wayland] Bugfix: Size limits included frame size for fallback decorations
|
- [Wayland] Bugfix: Size limits included frame size for fallback decorations
|
||||||
|
- [Wayland] Bugfix: Updating `GLFW_DECORATED` had no effect on server-side
|
||||||
|
decorations
|
||||||
|
|
||||||
|
|
||||||
## Contact
|
## Contact
|
||||||
|
@ -2161,10 +2161,24 @@ void _glfwPlatformSetWindowResizable(_GLFWwindow* window, GLFWbool enabled)
|
|||||||
|
|
||||||
void _glfwPlatformSetWindowDecorated(_GLFWwindow* window, GLFWbool enabled)
|
void _glfwPlatformSetWindowDecorated(_GLFWwindow* window, GLFWbool enabled)
|
||||||
{
|
{
|
||||||
if (enabled)
|
if (window->wl.xdg.decoration)
|
||||||
createDecorations(window);
|
{
|
||||||
|
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
|
else
|
||||||
destroyDecorations(window);
|
{
|
||||||
|
if (enabled)
|
||||||
|
createDecorations(window);
|
||||||
|
else
|
||||||
|
destroyDecorations(window);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void _glfwPlatformSetWindowFloating(_GLFWwindow* window, GLFWbool enabled)
|
void _glfwPlatformSetWindowFloating(_GLFWwindow* window, GLFWbool enabled)
|
||||||
|
Loading…
Reference in New Issue
Block a user