summaryrefslogtreecommitdiff
path: root/src/protocols/XDGShell.cpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2024-11-17 19:31:54 +0000
committerVaxry <vaxry@vaxry.net>2024-11-17 19:31:54 +0000
commitb735295d2b0025b26f88852c06f65514a963c711 (patch)
tree166560e38a396af304db4ec28ca14ba7bb7eedba /src/protocols/XDGShell.cpp
parent8d5cdedbd350b4730a1aa57dc5491c88dff3415e (diff)
windows/xdg: minor cleanup of min/max size calculations
fixes #8495
Diffstat (limited to 'src/protocols/XDGShell.cpp')
-rw-r--r--src/protocols/XDGShell.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/protocols/XDGShell.cpp b/src/protocols/XDGShell.cpp
index 25d8b1ba..932882e9 100644
--- a/src/protocols/XDGShell.cpp
+++ b/src/protocols/XDGShell.cpp
@@ -323,6 +323,14 @@ void CXDGToplevelResource::close() {
resource->sendClose();
}
+Vector2D CXDGToplevelResource::layoutMinSize() {
+ return owner ? current.minSize + owner->current.geometry.pos() : current.minSize;
+}
+
+Vector2D CXDGToplevelResource::layoutMaxSize() {
+ return owner ? current.maxSize + owner->current.geometry.pos() : current.maxSize;
+}
+
CXDGSurfaceResource::CXDGSurfaceResource(SP<CXdgSurface> resource_, SP<CXDGWMBase> owner_, SP<CWLSurfaceResource> surface_) :
owner(owner_), surface(surface_), resource(resource_) {
if (!good())