mirror of
https://github.com/glfw/glfw.git
synced 2024-11-25 11:35:11 +00:00
Wayland: Fix protocol error on undecorated window
When setting the visibility of a libdecor frame on a compositor that
supports XDG decorations, libdecor 0.1 will update the geometry of the
XDG surface. GLFW attempted to set the visibility before having told
libdecor what size the content area is. This caused a Wayland protocol
error when libdecor attempted to set the window size to 0x0.
This commit adds setting the content area size for the libdecor frame
directly after creation, allowing libdecor to know what it's doing.
(cherry picked from commit 23e40548b1
)
This commit is contained in:
parent
7cc8879ab9
commit
9809035ed2
@ -789,6 +789,11 @@ static GLFWbool createLibdecorFrame(_GLFWwindow* window)
|
||||
return GLFW_FALSE;
|
||||
}
|
||||
|
||||
struct libdecor_state* frameState =
|
||||
libdecor_state_new(window->wl.width, window->wl.height);
|
||||
libdecor_frame_commit(window->wl.libdecor.frame, frameState, NULL);
|
||||
libdecor_state_free(frameState);
|
||||
|
||||
if (strlen(window->wl.title))
|
||||
libdecor_frame_set_title(window->wl.libdecor.frame, window->wl.title);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user