summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Adams <robadams@ucla.edu>2003-03-08 18:15:22 +0000
committerRob Adams <readams@src.gnome.org>2003-03-08 18:15:22 +0000
commit4481be72d1e4073fad009dc24c3bf14d9e7659f4 (patch)
tree6026181722215a9890ef8eef5632b6a9f309ace7
parentc595a7ac0f77127c4f85c49b406f423aa864c9a5 (diff)
downloadmetacity-4481be72d1e4073fad009dc24c3bf14d9e7659f4.tar.gz
metacity-4481be72d1e4073fad009dc24c3bf14d9e7659f4.tar.bz2
Check that window min and max size hints are at least 1. Fix for #107110.
2003-03-08 Rob Adams <robadams@ucla.edu> * src/window-props.c (reload_normal_hints): Check that window min and max size hints are at least 1. Fix for #107110.
-rw-r--r--ChangeLog5
-rw-r--r--src/window-props.c33
2 files changed, 38 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 89c3991..b6bd36f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-03-08 Rob Adams <robadams@ucla.edu>
+
+ * src/window-props.c (reload_normal_hints): Check that window min
+ and max size hints are at least 1. Fix for #107110.
+
2003-02-27 Havoc Pennington <hp@pobox.com>
Changes made on plane from FOSDEM, syncing from laptop.
diff --git a/src/window-props.c b/src/window-props.c
index 1e334be..03d8608 100644
--- a/src/window-props.c
+++ b/src/window-props.c
@@ -620,6 +620,39 @@ reload_normal_hints (MetaWindow *window,
window->size_hints.min_height);
window->size_hints.max_height = window->size_hints.min_height;
}
+
+ if (window->size_hints.min_width < 1)
+ {
+ /* another cracksmoker */
+ meta_topic (META_DEBUG_GEOMETRY,
+ "Window %s sets min width to 0, which makes no sense\n",
+ window->desc);
+ window->size_hints.min_width = 1;
+ }
+ if (window->size_hints.max_width < 1)
+ {
+ /* another cracksmoker */
+ meta_topic (META_DEBUG_GEOMETRY,
+ "Window %s sets max width to 0, which makes no sense\n",
+ window->desc);
+ window->size_hints.max_width = 1;
+ }
+ if (window->size_hints.min_height < 1)
+ {
+ /* another cracksmoker */
+ meta_topic (META_DEBUG_GEOMETRY,
+ "Window %s sets min height to 0, which makes no sense\n",
+ window->desc);
+ window->size_hints.min_height = 1;
+ }
+ if (window->size_hints.max_height < 1)
+ {
+ /* another cracksmoker */
+ meta_topic (META_DEBUG_GEOMETRY,
+ "Window %s sets max height to 0, which makes no sense\n",
+ window->desc);
+ window->size_hints.max_height = 1;
+ }
if (window->size_hints.flags & PResizeInc)
{