diff options
author | Havoc Pennington <hp@pobox.com> | 2003-03-08 19:40:16 +0000 |
---|---|---|
committer | Havoc Pennington <hp@src.gnome.org> | 2003-03-08 19:40:16 +0000 |
commit | 476d8e56adb4c79e2bed0e0516004e2e3e90ca6f (patch) | |
tree | 8e164e8872e3c34339df23cd75f6598fd003ab04 | |
parent | 3dffe0c35b52cdf143337b910bd34f382d8d4dd4 (diff) | |
download | metacity-476d8e56adb4c79e2bed0e0516004e2e3e90ca6f.tar.gz |
Backport patch from Rob Adams to check that window min and max size hints
2003-03-08 Havoc Pennington <hp@pobox.com>
* src/window.c (update_size_hints): Backport patch from Rob Adams
to check that window min and max size hints are at least 1. Fix
for #107110.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | src/window.c | 10 |
2 files changed, 16 insertions, 0 deletions
@@ -1,3 +1,9 @@ +2003-03-08 Havoc Pennington <hp@pobox.com> + + * src/window.c (update_size_hints): Backport patch from Rob Adams + to check that window min and max size hints are at least 1. Fix + for #107110. + 2003-02-26 Dmitry G. Mastrukov <dmitry@taurussoft.org> * configure.in: Added Belarusian to ALL_LINGUAS. diff --git a/src/window.c b/src/window.c index 41e8287b..5a078de8 100644 --- a/src/window.c +++ b/src/window.c @@ -4413,6 +4413,16 @@ update_size_hints (MetaWindow *window) window->size_hints.min_height); window->size_hints.max_height = window->size_hints.min_height; } + + /* fix busted apps that set 0x0 hints */ + if (window->size_hints.max_height < 1) + window->size_hints.max_height = 1; + if (window->size_hints.min_height < 1) + window->size_hints.min_height = 1; + if (window->size_hints.max_width < 1) + window->size_hints.max_width = 1; + if (window->size_hints.min_width < 1) + window->size_hints.min_width = 1; if (window->size_hints.flags & PResizeInc) { |