Tom Menari --> dwm (2006-09-30 21:50:25 +0100):
> I have noticed a bug, in the mercurial dev version. If you switch
> +to wide mode, then use
> resizecol you can resize something too much, and dwm will
> +close/crash.
Indeed, resizecol only works correctly if stackpos != Stackbottom. The
attached patch should fix this bug.
Cheers, Jukka
--
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~
diff -r 6cad48068e4c view.c
--- a/view.c Fri Sep 29 19:06:27 2006 +0200
+++ b/view.c Sun Oct 01 13:31:04 2006 +0200
@@ -261,6 +261,7 @@ resizecol(Arg *arg) {
resizecol(Arg *arg) {
unsigned int n;
Client *c;
+ int s;
for(n = 0, c = clients; c; c = c->next)
if(isvisible(c) && !c->isfloat)
@@ -268,13 +269,14 @@ resizecol(Arg *arg) {
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;
}