mirror of
https://github.com/swaywm/sway.git
synced 2025-11-06 13:29:50 -05:00
fixed focus_parent, moved into move_focus() function
This commit is contained in:
parent
6f0a1cdcd1
commit
b43161fd45
3 changed files with 21 additions and 11 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue