diff options
author | Graeme Geldenhuys <graemeg@gmail.com> | 2014-04-21 20:34:06 +0100 |
---|---|---|
committer | Graeme Geldenhuys <graemeg@gmail.com> | 2014-04-21 20:34:06 +0100 |
commit | c2567ef317b407dd3417ec213a47edc8366a641d (patch) | |
tree | cc0cd4747ceadc2d1c2c497d1d52fc4504cb6a12 /src/corelib/x11 | |
parent | 6e71844910ee5c80b2a31dee1b60871fdee14530 (diff) | |
download | fpGUI-c2567ef317b407dd3417ec213a47edc8366a641d.tar.xz |
x11: further improvement to get maxwidth/maxheight fully working.
Diffstat (limited to 'src/corelib/x11')
-rw-r--r-- | src/corelib/x11/fpg_x11.pas | 10 |
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 |