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@
This commit is contained in:
oga
2009-08-25 01:32:40 +00:00
parent fcb2684db1
commit 8fd4ff1c7c
2 changed files with 7 additions and 6 deletions

View File

@@ -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);