sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit 9af0b4d2ea8ff3285077e9323172460d44cc27dc
parent 95c444de337fcf39d16cc4d9b26842177f24256a
Author: Sauyon Lee <s@uyon.co>
Date:   Tue, 16 Jul 2019 11:47:44 +0100

Make fullscreen check for fullscreen parents

This ensures that a child of a fullscreen container cannot
be fullscreened.

Diffstat:
Msway/commands/fullscreen.c | 11+++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/sway/commands/fullscreen.c b/sway/commands/fullscreen.c @@ -33,8 +33,15 @@ struct cmd_results *cmd_fullscreen(int argc, char **argv) { } } - bool is_fullscreen = container && - container->fullscreen_mode != FULLSCREEN_NONE; + bool is_fullscreen = false; + 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 enable = !is_fullscreen;