diff options
author | Drew DeVault <sir@cmpwn.com> | 2015-08-09 20:20:53 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2015-08-09 20:21:08 -0400 |
commit | 8597c3c7e7c2fcdb712f49e06c70882541389929 (patch) | |
tree | aa3f25c610cf5b19982da69fa864cc4a440f2523 | |
parent | commands: re-add log_colors (diff) | |
download | sway-8597c3c7e7c2fcdb712f49e06c70882541389929.tar.gz sway-8597c3c7e7c2fcdb712f49e06c70882541389929.tar.zst sway-8597c3c7e7c2fcdb712f49e06c70882541389929.zip |
Implement focus parent
-rw-r--r-- | sway/commands.c | 5 |
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) { | |||
111 | move_focus(MOVE_UP); | 111 | move_focus(MOVE_UP); |
112 | } else if (strcasecmp(argv[0], "down") == 0) { | 112 | } else if (strcasecmp(argv[0], "down") == 0) { |
113 | move_focus(MOVE_DOWN); | 113 | move_focus(MOVE_DOWN); |
114 | } else if (strcasecmp(argv[0], "parent") == 0) { | ||
115 | swayc_t *current = get_focused_container(&root_container); | ||
116 | current->parent->focused = NULL; | ||
117 | unfocus_all(current->parent); | ||
118 | focus_view(current->parent); | ||
114 | } | 119 | } |
115 | return 0; | 120 | return 0; |
116 | } | 121 | } |