aboutsummaryrefslogtreecommitdiff
path: root/monsterwm.c
diff options
context:
space:
mode:
authorIvan Kanakarakis <ivan.kanak@gmail.com>2011-12-18 00:46:07 +0200
committerIvan Kanakarakis <ivan.kanak@gmail.com>2011-12-18 02:43:04 +0200
commita02ce96a06a8b14d5b0a1399995557ab4ee7a147 (patch)
treefb661f5d78ae8bf0039364e55d402b0f01011be7 /monsterwm.c
parentcf5564f1b51416b2d497e0c18341719497e813cc (diff)
grid layout: remove unneeded check and fix height adjustment
Diffstat (limited to 'monsterwm.c')
-rw-r--r--monsterwm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/monsterwm.c b/monsterwm.c
index 1c94c02..fadb2bb 100644
--- a/monsterwm.c
+++ b/monsterwm.c
@@ -116,8 +116,8 @@ static int previous_desktop = 0;
static int growth = 0;
static int mode = DEFAULT_MODE;
static int master_size;
-static int sh;
-static int sw;
+static int sh; /* screen height minus the panel height */
+static int sw; /* screen width */
static int screen;
static int xerror(Display *dis, XErrorEvent *ee);
static int (*xerrorxlib)(Display *, XErrorEvent *);
@@ -615,7 +615,7 @@ void tile(void) {
for(c=head; c; c=c->next, i++) {
if(i/rows + 1 > cols - n%cols)
rows = n/cols + 1;
- ch = rows ? (sh-y)/rows : sh;
+ ch = sh/rows;
cx = 0 + cn*cw;
cy = y + rn*ch;
XMoveResizeWindow(dis, c->win, cx, cy, cw - 2*BORDER_WIDTH, ch - 2*BORDER_WIDTH);