diff options
author | Vaxry <[email protected]> | 2024-11-19 21:40:16 +0000 |
---|---|---|
committer | Vaxry <[email protected]> | 2024-11-19 21:45:20 +0000 |
commit | e735eae4adb841ed22f9a068257e3dcc9ffd3881 (patch) | |
tree | e043fe61a2c9736c25ce0298ad696c0261950908 | |
parent | 57cf6d81a9a3f45feaff894bcbc87240b6e8afe6 (diff) | |
download | Hyprland-e735eae4adb841ed22f9a068257e3dcc9ffd3881.tar.gz Hyprland-e735eae4adb841ed22f9a068257e3dcc9ffd3881.zip |
xdg-shell: don't report invalid min/max sizes on unset
fixes #8522
-rw-r--r-- | src/protocols/XDGShell.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/protocols/XDGShell.cpp b/src/protocols/XDGShell.cpp index 932882e9..f121070d 100644 --- a/src/protocols/XDGShell.cpp +++ b/src/protocols/XDGShell.cpp @@ -324,10 +324,14 @@ void CXDGToplevelResource::close() { } Vector2D CXDGToplevelResource::layoutMinSize() { + if (current.minSize.x <= 1 && current.minSize.y <= 1) + return {0, 0}; return owner ? current.minSize + owner->current.geometry.pos() : current.minSize; } Vector2D CXDGToplevelResource::layoutMaxSize() { + if (current.maxSize.x <= 1 && current.maxSize.y <= 1) + return {0, 0}; return owner ? current.maxSize + owner->current.geometry.pos() : current.maxSize; } |