From 2d3100e47eee6a8bf2209ee19157de6d23dd1c55 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 28 Jan 2021 20:40:10 +0100 Subject: Fix size hints on X11 --- src/x11.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/x11.c b/src/x11.c index 40a79f8..9b688bb 100644 --- a/src/x11.c +++ b/src/x11.c @@ -216,20 +216,23 @@ updateSizeHints(const PuglView* view) sizeHints.max_height = (int)view->frame.height; } else { if (view->defaultWidth || view->defaultHeight) { - sizeHints.flags = PBaseSize; + sizeHints.flags |= PBaseSize; sizeHints.base_width = view->defaultWidth; sizeHints.base_height = view->defaultHeight; } + if (view->minWidth || view->minHeight) { - sizeHints.flags = PMinSize; + sizeHints.flags |= PMinSize; sizeHints.min_width = view->minWidth; sizeHints.min_height = view->minHeight; } + if (view->maxWidth || view->maxHeight) { - sizeHints.flags = PMaxSize; + sizeHints.flags |= PMaxSize; sizeHints.max_width = view->maxWidth; sizeHints.max_height = view->maxHeight; } + if (view->minAspectX) { sizeHints.flags |= PAspect; sizeHints.min_aspect.x = view->minAspectX; -- cgit v1.2.1