diff -r c0defd7d5a5a client.c --- a/client.c Thu Aug 03 17:08:43 2006 +0200 +++ b/client.c Thu Aug 03 18:14:09 2006 +0200 @@ -65,11 +65,12 @@ focusnext(Arg *arg) focusnext(Arg *arg) { Client *c; + Bool wasmax; if(!sel) return; - if(sel->ismax) + if((wasmax = sel->ismax)) togglemax(NULL); if(!(c = getnext(sel->next))) @@ -78,17 +79,20 @@ focusnext(Arg *arg) higher(c); focus(c); } + if (wasmax) + togglemax(NULL); } void focusprev(Arg *arg) { Client *c; - - if(!sel) - return; - - if(sel->ismax) + Bool wasmax; + + if(!sel) + return; + + if((wasmax = sel->ismax)) togglemax(NULL); if(!(c = getprev(sel->prev))) { @@ -99,6 +103,8 @@ focusprev(Arg *arg) higher(c); focus(c); } + if (wasmax) + togglemax(NULL); } Client *