[hackers] [wmii] Skip non-focusable windows on select up/down. || Kris Maglione

From: <hg_AT_suckless.org>
Date: Fri, 4 Jun 2010 01:48:13 +0000 (UTC)

changeset: 2698:cb990801b458
user: Kris Maglione <kris_AT_suckless.org>
date: Thu Jun 03 17:18:40 2010 -0400
files: cmd/wmii/column.c
description:
Skip non-focusable windows on select up/down.

diff -r fe8a99d89597 -r cb990801b458 cmd/wmii/column.c
--- a/cmd/wmii/column.c Thu Jun 03 17:08:50 2010 -0400
+++ b/cmd/wmii/column.c Thu Jun 03 17:18:40 2010 -0400
@@ -192,29 +192,31 @@
 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;
 }
 
Received on Fri Jun 04 2010 - 01:48:13 UTC

This archive was generated by hypermail 2.2.0 : Fri Jun 04 2010 - 02:00:08 UTC