about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--view.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/view.c b/view.c
index 61144df..6ca82d1 100644
--- a/view.c
+++ b/view.c
@@ -103,18 +103,19 @@ dofloat(Arg *arg) {
  */
 void
 dotile(Arg *arg) {
-	int i, n, stackw, stackh, tw, th;
-	unsigned int md = ((stackpos == StackBottom ? sh - bh : sw) * master) / 100;
+	unsigned int i, n, md, stackw, stackh, tw, th;
 	Client *c;
 
 	for(n = 0, c = nexttiled(clients); c; c = nexttiled(c->next))
 		n++;
 
 	if(stackpos == StackBottom) {
+		md = ((sh - bh) * master) / 100;
 		stackw = sw;
 		stackh = sh - bh - md;
 	}
 	else {
+		md = (sw * master) / 100;
 		stackw = sw - md;
 		stackh = sh - bh;
 	}
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132