mirror of
https://github.com/swaywm/sway.git
synced 2024-11-13 05:54:11 +01:00
Make fullscreen check for fullscreen parents
This ensures that a child of a fullscreen container cannot be fullscreened.
This commit is contained in:
parent
95c444de33
commit
9af0b4d2ea
@ -33,8 +33,15 @@ struct cmd_results *cmd_fullscreen(int argc, char **argv) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool is_fullscreen = container &&
|
bool is_fullscreen = false;
|
||||||
container->fullscreen_mode != FULLSCREEN_NONE;
|
for (struct sway_container *curr = container; curr; curr = curr->parent) {
|
||||||
|
if (curr && curr->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 New Issue
Block a user