Fix bug with focus parent
Thanks anon
This commit is contained in:
parent
fed757ebb2
commit
b49cfa0c16
|
@ -113,9 +113,11 @@ int cmd_focus(struct sway_config *config, int argc, char **argv) {
|
||||||
move_focus(MOVE_DOWN);
|
move_focus(MOVE_DOWN);
|
||||||
} else if (strcasecmp(argv[0], "parent") == 0) {
|
} else if (strcasecmp(argv[0], "parent") == 0) {
|
||||||
swayc_t *current = get_focused_container(&root_container);
|
swayc_t *current = get_focused_container(&root_container);
|
||||||
current->parent->focused = NULL;
|
if (current && current->parent) {
|
||||||
unfocus_all(current->parent);
|
current->parent->focused = NULL;
|
||||||
focus_view(current->parent);
|
unfocus_all(current->parent);
|
||||||
|
focus_view(current->parent);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue