[hackers] [wmii] Make sure increment hints are at least 1.

From: Kris Maglione <jg_AT_suckless.org>
Date: Fri, 01 Jun 2007 01:10:18 -0000

changeset: 2125:92d445bbd20f
user: Kris Maglione <jg_AT_suckless.org>
date: Mon Apr 23 13:42:07 2007 -0400
summary: Make sure increment hints are at least 1.

diff -r a90ebe53d262 -r 92d445bbd20f cmd/wmii/x11.c
--- a/cmd/wmii/x11.c Mon Apr 23 02:47:44 2007 -0400
+++ b/cmd/wmii/x11.c Mon Apr 23 13:42:07 2007 -0400
@@ -672,6 +672,7 @@ sethints(Window *w) {
         memset(h, 0, sizeof *h);
 
         h->max = Pt(MaxInt, MaxInt);
+ h->inc = Pt(1,1);
 
         if(!XGetWMNormalHints(display, w->w, &xs, &size))
                 return;
@@ -695,10 +696,9 @@ sethints(Window *w) {
                 h->baspect = p;
         }
 
- h->inc = Pt(1,1);
         if(xs.flags&PResizeInc) {
- h->inc.x = xs.width_inc;
- h->inc.y = xs.height_inc;
+ h->inc.x = max(xs.width_inc, 1);
+ h->inc.y = max(xs.height_inc, 1);
         }
 
         if(xs.flags&PAspect) {
Received on Fri Jun 01 2007 - 03:10:17 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:57:05 UTC