aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/fullscreen.c
diff options
context:
space:
mode:
authorLibravatar Sauyon Lee <s@uyon.co>2019-07-16 11:47:44 +0100
committerLibravatar Drew DeVault <sir@cmpwn.com>2019-07-17 09:25:36 -0400
commit9af0b4d2ea8ff3285077e9323172460d44cc27dc (patch)
treecb8b77a99bc6eeb975372543587a9b3dcdd6720c /sway/commands/fullscreen.c
parentSanity check gaps on the outside of the workspace (diff)
downloadsway-9af0b4d2ea8ff3285077e9323172460d44cc27dc.tar.gz
sway-9af0b4d2ea8ff3285077e9323172460d44cc27dc.tar.zst
sway-9af0b4d2ea8ff3285077e9323172460d44cc27dc.zip
Make fullscreen check for fullscreen parents
This ensures that a child of a fullscreen container cannot be fullscreened.
Diffstat (limited to 'sway/commands/fullscreen.c')
-rw-r--r--sway/commands/fullscreen.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sway/commands/fullscreen.c b/sway/commands/fullscreen.c
index a268ba03..0d7ba112 100644
--- a/sway/commands/fullscreen.c
+++ b/sway/commands/fullscreen.c
@@ -33,8 +33,15 @@ struct cmd_results *cmd_fullscreen(int argc, char **argv) {
33 } 33 }
34 } 34 }
35 35
36 bool is_fullscreen = container && 36 bool is_fullscreen = false;
37 container->fullscreen_mode != FULLSCREEN_NONE; 37 for (struct sway_container *curr = container; curr; curr = curr->parent) {
38 if (curr && curr->fullscreen_mode != FULLSCREEN_NONE) {
39 container = curr;
40 is_fullscreen = true;
41 break;
42 }
43 }
44
38 bool global = false; 45 bool global = false;
39 bool enable = !is_fullscreen; 46 bool enable = !is_fullscreen;
40 47