diff options
author | Taiyu <taiyu.len@gmail.com> | 2015-08-10 00:05:44 -0700 |
---|---|---|
committer | Taiyu <taiyu.len@gmail.com> | 2015-08-10 00:05:44 -0700 |
commit | b43161fd45c794448d17e705413949dbb62727db (patch) | |
tree | 7523ded3c7d8ec6a6715437caf17f89d1ba0fdcc /sway/commands.c | |
parent | 6f0a1cdcd1c4b77aab062670e5522ebc1e956208 (diff) |
fixed focus_parent, moved into move_focus() function
Diffstat (limited to 'sway/commands.c')
-rw-r--r-- | sway/commands.c | 7 |
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; } |