foo-wm

(Archived) Experimental Zooming IPC-based WM
git clone http://milesalan.com/git/foo-wm
Log | Files | Refs | Mirror | README | LICENSE

commit 7ca5faa0cf97c1044714f5bb0ee0360ff412c4e4
parent a5967e88c2d4841791238106d84255680629a95e
Author: = <miles.sandlar@gmail.com>
Date:   Sun, 12 Aug 2012 00:48:05 -0400

Handling saving the focus in getClientByDirection

Diffstat:
Msrc/tree.c | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/tree.c b/src/tree.c @@ -396,10 +396,13 @@ Node * getClientByDirection(Node * originNode, int direction) { if (!returnNode) { /* Search up until we have a brother in the direction */ if (originNode -> parent) originNode = originNode -> parent; - else break;; + else break; } else { /* Search down until we have a client */ - while (!isClient(returnNode)) returnNode = returnNode -> child; + while (!isClient(returnNode)) { + returnNode = returnNode -> focus ? + returnNode -> focus : returnNode -> child; + } } c++; }