Wayland: Fix decorations not always being created

If a window was initially fullscreen then it would not get an XDG
decoration object.  If the window was later switched to windowed mode it
would then get fallback decorations instead of XDG ones.

(cherry picked from commit 735fc101f5)
This commit is contained in:
Camilla Löwy 2022-12-20 18:34:08 +01:00
parent 8522447792
commit ba99e20f6a

View File

@ -670,6 +670,7 @@ static GLFWbool createShellObjects(_GLFWwindow* window)
xdg_toplevel_set_maximized(window->wl.xdg.toplevel); xdg_toplevel_set_maximized(window->wl.xdg.toplevel);
setIdleInhibitor(window, GLFW_FALSE); setIdleInhibitor(window, GLFW_FALSE);
}
if (_glfw.wl.decorationManager) if (_glfw.wl.decorationManager)
{ {
@ -691,10 +692,9 @@ static GLFWbool createShellObjects(_GLFWwindow* window)
} }
else else
{ {
if (window->decorated) if (window->decorated && !window->monitor)
createFallbackDecorations(window); createFallbackDecorations(window);
} }
}
if (window->minwidth != GLFW_DONT_CARE && window->minheight != GLFW_DONT_CARE) if (window->minwidth != GLFW_DONT_CARE && window->minheight != GLFW_DONT_CARE)
{ {