summaryrefslogtreecommitdiff
path: root/src/protocols/XDGShell.cpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2024-11-19 21:40:16 +0000
committerVaxry <vaxry@vaxry.net>2024-11-19 21:40:16 +0000
commitaa067a4cf12522ede1752dd2048ce67d07e903f1 (patch)
treecca7a8b6b6e4efd4a1d87959bf4ae6bf1673c494 /src/protocols/XDGShell.cpp
parent67cee430061626ccd73dc6d30eed9db289053608 (diff)
xdg-shell: don't report invalid min/max sizes on unset
fixes #8522
Diffstat (limited to 'src/protocols/XDGShell.cpp')
-rw-r--r--src/protocols/XDGShell.cpp4
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;
}