summaryrefslogtreecommitdiff
path: root/app/cwm/mousefunc.c
diff options
context:
space:
mode:
authorOwain Ainsworth <oga@cvs.openbsd.org>2009-08-25 01:32:41 +0000
committerOwain Ainsworth <oga@cvs.openbsd.org>2009-08-25 01:32:41 +0000
commit8f8a5caad884d53d340bd411fda46e964df4fb6b (patch)
treec6ad7b6ac85725cac2192f263952d9d5ad1a7227 /app/cwm/mousefunc.c
parent37cec52c74189504d0f274d412f6bc5da40f55e2 (diff)
Instead of messing around everytime we do a resize, just clamp the
resize increments to a minimum of one, and use it unconditionally. "you've convinced me, do it!" okan@
Diffstat (limited to 'app/cwm/mousefunc.c')
-rw-r--r--app/cwm/mousefunc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/cwm/mousefunc.c b/app/cwm/mousefunc.c
index 5b43a8143..c40fb6a44 100644
--- a/app/cwm/mousefunc.c
+++ b/app/cwm/mousefunc.c
@@ -16,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $Id: mousefunc.c,v 1.13 2009/08/24 23:49:04 okan Exp $
+ * $Id: mousefunc.c,v 1.14 2009/08/25 01:32:40 oga Exp $
*/
#include "headers.h"
@@ -49,8 +49,8 @@ mousefunc_sweep_draw(struct client_ctx *cc)
int width, height, width_size, width_name;
snprintf(asize, sizeof(asize), "%dx%d",
- (cc->geom.width - cc->geom.basew) / MAX(1, cc->geom.incw),
- (cc->geom.height - cc->geom.baseh) / MAX(1, cc->geom.inch));
+ (cc->geom.width - cc->geom.basew) / cc->geom.incw,
+ (cc->geom.height - cc->geom.baseh) / cc->geom.inch);
width_size = font_width(asize, strlen(asize)) + 4;
width_name = font_width(cc->name, strlen(cc->name)) + 4;
width = MAX(width_size, width_name);