aboutsummaryrefslogtreecommitdiff
path: root/sway/commands.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2015-08-10 10:18:04 -0400
committerDrew DeVault <sir@cmpwn.com>2015-08-10 10:18:04 -0400
commitf9ae9ab6e37f1dab657527028f3123290f299406 (patch)
tree6e582145410b24851b41f0f3e3208920dac9eed3 /sway/commands.c
parent113fb708fb4b1d4eb49e4b6ea6a6c6a45c4e7a1a (diff)
parentf923c4e6b93a5361c1737b239dbacef6e7219b04 (diff)
Merge pull request #4 from taiyu-len/master
fixed focus_parent, moved into move_focus() function
Diffstat (limited to 'sway/commands.c')
-rw-r--r--sway/commands.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/sway/commands.c b/sway/commands.c
index 40d9d353..64130fdc 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -112,12 +112,7 @@ int cmd_focus(struct sway_config *config, int argc, char **argv) {
} else if (strcasecmp(argv[0], "down") == 0) {
return move_focus(MOVE_DOWN);
} else if (strcasecmp(argv[0], "parent") == 0) {
- swayc_t *current = get_focused_container(&root_container);
- if (current && current->parent) {
- current->parent->focused = NULL;
- unfocus_all(current->parent);
- focus_view(current->parent);
- }
+ return move_focus(MOVE_PARENT);
}
return 0;
}