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 8d5cdedbd3
commit b735295d2b
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())

View File

@@ -99,6 +99,9 @@ class CXDGToplevelResource {
bool good();
Vector2D layoutMinSize();
Vector2D layoutMaxSize();
// schedule a configure event
uint32_t setSize(const Vector2D& size);
uint32_t setMaximized(bool maximized);