view.c
changeset 521 73afe7587bea
parent 515 d6d1d0033e3c
child 522 fd1275f3b205
--- a/view.c	Thu Oct 05 09:37:11 2006 +0200
+++ b/view.c	Thu Oct 05 11:00:55 2006 +0200
@@ -259,6 +259,7 @@
 
 void
 resizecol(Arg *arg) {
+	int s;
 	unsigned int n;
 	Client *c;
 
@@ -268,13 +269,14 @@
 	if(!sel || sel->isfloat || n < 2 || (arrange == dofloat))
 		return;
 
+	s = stackpos == StackBottom ? sh - bh : sw;
 	if(sel == getnext(clients)) {
-		if(master + arg->i > sw - MINW || master + arg->i < MINW)
+		if(master + arg->i > s - MINW || master + arg->i < MINW)
 			return;
 		master += arg->i;
 	}
 	else {
-		if(master - arg->i > sw - MINW || master - arg->i < MINW)
+		if(master - arg->i > s - MINW || master - arg->i < MINW)
 			return;
 		master -= arg->i;
 	}