aboutsummaryrefslogtreecommitdiff
path: root/sway/commands.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2015-08-09 20:20:53 -0400
committerDrew DeVault <sir@cmpwn.com>2015-08-09 20:21:08 -0400
commit8597c3c7e7c2fcdb712f49e06c70882541389929 (patch)
treeaa3f25c610cf5b19982da69fa864cc4a440f2523 /sway/commands.c
parentd62efd70e423104dc21405535be59782880271c6 (diff)
Implement focus parent
Diffstat (limited to 'sway/commands.c')
-rw-r--r--sway/commands.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sway/commands.c b/sway/commands.c
index 15c43ac2..725eaf15 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -111,6 +111,11 @@ int cmd_focus(struct sway_config *config, int argc, char **argv) {
move_focus(MOVE_UP);
} else if (strcasecmp(argv[0], "down") == 0) {
move_focus(MOVE_DOWN);
+ } else if (strcasecmp(argv[0], "parent") == 0) {
+ swayc_t *current = get_focused_container(&root_container);
+ current->parent->focused = NULL;
+ unfocus_all(current->parent);
+ focus_view(current->parent);
}
return 0;
}