mirror of
https://github.com/glfw/glfw.git
synced 2024-11-25 22:14:34 +00:00
Wayland: Fix map before XDG decoration configure
If the xdg_toplevel has a decoration, we need to wait for its first configure event as well before we are allowed to attach the first buffer. It seems racy to assume that this will always happen inside the first surface configure sequence, so this commit makes that condition explicit. This may turn out to have been overly defensive.
This commit is contained in:
parent
2df0ce07fa
commit
3203599cac
@ -569,8 +569,13 @@ static void xdgSurfaceHandleConfigure(void* userData,
|
|||||||
|
|
||||||
if (!window->wl.visible)
|
if (!window->wl.visible)
|
||||||
{
|
{
|
||||||
window->wl.visible = GLFW_TRUE;
|
// Allow the window to be mapped only if it either has no XDG
|
||||||
_glfwInputWindowDamage(window);
|
// decorations or they have already received a configure event
|
||||||
|
if (!window->wl.xdg.decoration || window->wl.xdg.decorationMode)
|
||||||
|
{
|
||||||
|
window->wl.visible = GLFW_TRUE;
|
||||||
|
_glfwInputWindowDamage(window);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user