aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Ronan Pigott <rpigott@berkeley.edu>2021-04-15 17:01:27 -0700
committerLibravatar Simon Ser <contact@emersion.fr>2021-04-16 11:36:14 +0200
commitecfd687977ec210bf22f1a73852bee2df0af0709 (patch)
treeac7812955e3b157902effcf17d302d108a9742bc
parentcontainer: don't set fullscreen on children (diff)
downloadsway-ecfd687977ec210bf22f1a73852bee2df0af0709.tar.gz
sway-ecfd687977ec210bf22f1a73852bee2df0af0709.tar.zst
sway-ecfd687977ec210bf22f1a73852bee2df0af0709.zip
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.
-rw-r--r--sway/commands/fullscreen.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/sway/commands/fullscreen.c b/sway/commands/fullscreen.c
index a5d30d0e..bc59201c 100644
--- a/sway/commands/fullscreen.c
+++ b/sway/commands/fullscreen.c
@@ -33,15 +33,7 @@ struct cmd_results *cmd_fullscreen(int argc, char **argv) {
33 } 33 }
34 } 34 }
35 35
36 bool is_fullscreen = false; 36 bool is_fullscreen = container->pending.fullscreen_mode != FULLSCREEN_NONE;
37 for (struct sway_container *curr = container; curr; curr = curr->pending.parent) {
38 if (curr->pending.fullscreen_mode != FULLSCREEN_NONE) {
39 container = curr;
40 is_fullscreen = true;
41 break;
42 }
43 }
44
45 bool global = false; 37 bool global = false;
46 bool enable = !is_fullscreen; 38 bool enable = !is_fullscreen;
47 39