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.
master
Ronan Pigott 4 years ago committed by Simon Ser
parent eb9e77f4ea
commit ecfd687977

@ -33,15 +33,7 @@ struct cmd_results *cmd_fullscreen(int argc, char **argv) {
} }
} }
bool is_fullscreen = false; bool is_fullscreen = container->pending.fullscreen_mode != FULLSCREEN_NONE;
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 global = false; bool global = false;
bool enable = !is_fullscreen; bool enable = !is_fullscreen;

Loading…
Cancel
Save