windows/xdg: minor cleanup of min/max size calculations

fixes #8495
This commit is contained in:
Vaxry
2024-11-17 19:31:54 +00:00
parent a4a1ad1f9b
commit a77ffa8cb8
10 changed files with 57 additions and 53 deletions

View File

@@ -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())