Operate on floating split container when a child is focused

This commit is contained in:
Ryan Dwyer 2018-07-26 22:42:58 +10:00
parent 902a1402ba
commit 936168e740
3 changed files with 27 additions and 2 deletions

View file

@ -29,6 +29,14 @@ struct cmd_results *cmd_floating(int argc, char **argv) {
seat_set_focus(config->handler_context.seat, container);
}
// If the container is in a floating split container,
// operate on the split container instead of the child.
if (container_is_floating_or_child(container)) {
while (container->parent->layout != L_FLOATING) {
container = container->parent;
}
}
bool wants_floating;
if (strcasecmp(argv[0], "enable") == 0) {
wants_floating = true;