foo-wm

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

commit 25301386b868788aea0243c868287d015a68f8a7
parent 214ba3c23bf202998096316cc5a8e952f69283ce
Author: Miles Sandlar <miles.sandlar@gmail.com>
Date:   Wed, 18 Jul 2012 18:59:59 -0400

Proper logic for FIFO command: select children

Diffstat:
Msrc/commands.c | 15++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/src/commands.c b/src/commands.c @@ -75,12 +75,25 @@ void handleCommand(char* request) { } } else if (!strcmp(tokens[1], "child")) { fprintf(stderr, "Selectign on child node\n"); + + //If were a selected node and there is a child + if (selectedNode && selectedNode -> child) { + Node *n = focusedNode; + while (n && n -> parent != selectedNode) n = n -> parent; + if (!n) return; + + placeNode(viewNode, rootX, rootY, rootWidth, rootHeight); + selectNode(n, True); + } + + /* if (!selectedNode || !selectedNode -> focus) return; - if (isClient(selectedNode -> focus)) + else if (isClient(selectedNode -> focus)) focusNode(selectedNode -> focus, NULL); else selectNode(selectedNode -> focus, True); + */ } } else if (!strcmp(tokens[0], "containerize")) {