cmd_fullscreen: allow fullscreen on fullscreen split containers

Using the fullscreen command on a child of a fullscreen split
container will now fullscreen the child instead of unfullscreening
the parent.
This commit is contained in:
Ronan Pigott 2021-04-15 17:01:27 -07:00 committed by Simon Ser
parent eb9e77f4ea
commit ecfd687977

View file

@ -33,15 +33,7 @@ struct cmd_results *cmd_fullscreen(int argc, char **argv) {
}
}
bool is_fullscreen = false;
for (struct sway_container *curr = container; curr; curr = curr->pending.parent) {
if (curr->pending.fullscreen_mode != FULLSCREEN_NONE) {
container = curr;
is_fullscreen = true;
break;
}
}
bool is_fullscreen = container->pending.fullscreen_mode != FULLSCREEN_NONE;
bool global = false;
bool enable = !is_fullscreen;