mirror of
https://github.com/glfw/glfw.git
synced 2026-09-22 16:52:57 +00:00
Wayland: Set the correct min/max size when non-resizable
Libdecor is a thin wrapper around xdg_toplevel, and expects the same kind of information passed to it as if it was a xdg_toplevel. This includes the min/max size when non-resizable, which was set when using xdg_toplevel directly, but not when using libdecor. This fixes issues with min/max size missing when mapping a non-resizable window. Related to #2842
This commit is contained in:
committed by
Camilla Löwy
parent
e94108d9db
commit
ed6452b13c
+10
-2
@@ -986,6 +986,8 @@ static GLFWbool createLibdecorFrame(_GLFWwindow* window)
|
|||||||
|
|
||||||
libdecor_frame_set_title(window->wl.libdecor.frame, window->title);
|
libdecor_frame_set_title(window->wl.libdecor.frame, window->title);
|
||||||
|
|
||||||
|
if (window->resizable)
|
||||||
|
{
|
||||||
if (window->minwidth != GLFW_DONT_CARE &&
|
if (window->minwidth != GLFW_DONT_CARE &&
|
||||||
window->minheight != GLFW_DONT_CARE)
|
window->minheight != GLFW_DONT_CARE)
|
||||||
{
|
{
|
||||||
@@ -1001,11 +1003,17 @@ static GLFWbool createLibdecorFrame(_GLFWwindow* window)
|
|||||||
window->maxwidth,
|
window->maxwidth,
|
||||||
window->maxheight);
|
window->maxheight);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (!window->resizable)
|
else
|
||||||
{
|
{
|
||||||
libdecor_frame_unset_capabilities(window->wl.libdecor.frame,
|
libdecor_frame_unset_capabilities(window->wl.libdecor.frame,
|
||||||
LIBDECOR_ACTION_RESIZE);
|
LIBDECOR_ACTION_RESIZE);
|
||||||
|
libdecor_frame_set_min_content_size(window->wl.libdecor.frame,
|
||||||
|
window->wl.width,
|
||||||
|
window->wl.height);
|
||||||
|
libdecor_frame_set_max_content_size(window->wl.libdecor.frame,
|
||||||
|
window->wl.width,
|
||||||
|
window->wl.height);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (window->monitor)
|
if (window->monitor)
|
||||||
|
|||||||
Reference in New Issue
Block a user