summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graemeg@gmail.com>2014-04-21 20:34:06 +0100
committerGraeme Geldenhuys <graemeg@gmail.com>2014-04-21 20:34:06 +0100
commitc2567ef317b407dd3417ec213a47edc8366a641d (patch)
treecc0cd4747ceadc2d1c2c497d1d52fc4504cb6a12
parent6e71844910ee5c80b2a31dee1b60871fdee14530 (diff)
downloadfpGUI-c2567ef317b407dd3417ec213a47edc8366a641d.tar.xz
x11: further improvement to get maxwidth/maxheight fully working.
-rw-r--r--src/corelib/x11/fpg_x11.pas10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/corelib/x11/fpg_x11.pas b/src/corelib/x11/fpg_x11.pas
index 0f7e7cf0..dd79e25e 100644
--- a/src/corelib/x11/fpg_x11.pas
+++ b/src/corelib/x11/fpg_x11.pas
@@ -2381,8 +2381,14 @@ begin
hints.flags := hints.flags or PMinSize or PMaxSize;
hints.min_width := FMinWidth;
hints.min_height := FMinHeight;
- hints.max_width := FMaxWidth;
- hints.max_height := FMaxHeight;
+ if FMaxWidth > 0 then
+ hints.max_width := FMaxWidth
+ else
+ hints.max_width := xapplication.ScreenWidth;
+ if FMaxHeight > 0 then
+ hints.max_height := FMaxHeight
+ else
+ hints.max_height := xapplication.ScreenHeight;
end
else
begin