foo-wm

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

commit f4ed770edc27fa6c28ac5e718ce9aa6616b9c27f
parent 142ba8037b95e1f2a45894b142049debc82a0c7b
Author: Miles Sandlar <miles.sandlar@gmail.com>
Date:   Sun, 22 Jul 2012 01:56:08 -0400

Proper setting of layout for layout command

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

diff --git a/src/commands.c b/src/commands.c @@ -37,7 +37,8 @@ void handleCommand(char* request) { } else if (!strcmp(tokens[0], "layout")) { fprintf(stderr, "Setting layout to: %s", tokens[1]); - Node *setNode = selectedNode ? selectedNode : focusedNode -> parent; + + Node *setNode = selectedNode && selectedNode -> parent ? selectedNode -> parent : focusedNode -> parent; if (!strcmp(tokens[1], "vertical")) setNode -> layout = VERTICAL; else if (!strcmp(tokens[1], "horizontal"))