summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary Wong <gtw@gnu.org>2012-01-30 12:49:52 -0700
committerGary Wong <gtw@gnu.org>2012-01-30 13:23:24 -0700
commit08f001d21cdfe73eac3de82d2ee8f90df470c1e6 (patch)
tree7477108e56ddb8d9e3924526c136717a0d4ce462
parentdfb575033ef2138bec13c0b08107e2ff7f30573f (diff)
Ignore invalid size increment hints.
-rw-r--r--ChangeLog5
-rw-r--r--managed.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 99e8b47..b11dd94 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-01-30 Gary Wong <gtw@gnu.org>
+
+ * managed.c (managed_property_change): Ignore invalid size increment
+ hints.
+
2010-11-09 Gary Wong <gtw@gnu.org>
* gwm.c (show_error) [USE_RANDR]: Show RANDR errors.
diff --git a/managed.c b/managed.c
index a510441..1e73513 100644
--- a/managed.c
+++ b/managed.c
@@ -589,6 +589,11 @@ extern void managed_property_change( struct gwm_window *window, int prop,
window->u.managed.width_inc = p32[ WM_NORMAL_HINTS_SIZE_INC_OFF ];
window->u.managed.height_inc =
p32[ WM_NORMAL_HINTS_SIZE_INC_OFF + 1 ];
+
+ if( window->u.managed.width_inc < 1 )
+ window->u.managed.width_inc = 1;
+ if( window->u.managed.height_inc < 1 )
+ window->u.managed.height_inc = 1;
}
if( p32[ WM_NORMAL_HINTS_FLAGS_OFF ] & WM_NORMAL_HINTS_ASPECT &&