mirror of
https://github.com/swaywm/sway.git
synced 2024-11-23 00:11:28 +00:00
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:
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…
Reference in a new issue