commit b986944d7a41589c542e02876fb834b355fccb4c parent b5ed1df3a104b9a72aee423e716a7c283aadddb2 Author: Kris Maglione <kris@suckless.org> Date: Thu, 3 Jun 2010 17:18:40 -0400 Skip non-focusable windows on select up/down. Diffstat:
cmd/wmii/column.c | | | 10 | ++++++---- |
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/cmd/wmii/column.c b/cmd/wmii/column.c @@ -192,29 +192,31 @@ Frame* stack_find(Area *a, Frame *f, int dir, bool stack) { Frame *fp; +#define predicate(f) !((f)->collapsed && stack || (f)->client->nofocus) switch (dir) { default: die("not reached"); case North: if(f) - for(f=f->aprev; f && f->collapsed && stack; f=f->aprev) + for(f=f->aprev; f && !predicate(f); f=f->aprev) ; else { f = nil; for(fp=a->frame; fp; fp=fp->anext) - if(!fp->collapsed || !stack) + if(predicate(fp)) f = fp; } break; case South: if(f) - for(f=f->anext; f && f->collapsed && stack; f=f->anext) + for(f=f->anext; f && !predicate(f); f=f->anext) ; else - for(f=a->frame; f && f->collapsed && stack; f=f->anext) + for(f=a->frame; f && !predicate(f); f=f->anext) ; break; } +#undef predicate return f; }