diff -r 759a5fbbd8b7 view.c --- a/view.c Fri Feb 16 16:51:27 2007 +0100 +++ b/view.c Sat Feb 17 14:03:49 2007 +0500 @@ -63,7 +63,7 @@ dofloat(void) { } } if(!sel || !isvisible(sel)) { - for(c = stack; c && !isvisible(c); c = c->snext); + for(c = stack; c && !focunusable(c); c = c->snext); focus(c); } restack(); @@ -115,21 +115,29 @@ dotile(void) { XMoveWindow(dpy, c->win, c->x + 2 * sw, c->y); } if(!sel || !isvisible(sel)) { - for(c = stack; c && !isvisible(c); c = c->snext); + for(c = stack; c && !focunusable(c); c = c->snext); focus(c); } restack(); } +Bool +focunusable(Client *c) { + return (c + && isvisible(c) + && (strcmp("panel", c->name) != 0) + ); +} + void focusnext(Arg *arg) { Client *c; if(!sel) return; - for(c = sel->next; c && !isvisible(c); c = c->next); + for(c = sel->next; c && !focunusable(c); c = c->next); if(!c) - for(c = clients; c && !isvisible(c); c = c->next); + for(c = clients; c && !focunusable(c); c = c->next); if(c) { focus(c); restack(); @@ -142,10 +150,10 @@ focusprev(Arg *arg) { if(!sel) return; - for(c = sel->prev; c && !isvisible(c); c = c->prev); + for(c = sel->prev; c && !focunusable(c); c = c->prev); if(!c) { for(c = clients; c && c->next; c = c->next); - for(; c && !isvisible(c); c = c->prev); + for(; c && !focunusable(c); c = c->prev); } if(c) { focus(c);