diff options
author | Ronan Pigott <rpigott@berkeley.edu> | 2021-04-15 17:01:27 -0700 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2021-04-16 11:36:14 +0200 |
commit | ecfd687977ec210bf22f1a73852bee2df0af0709 (patch) | |
tree | ac7812955e3b157902effcf17d302d108a9742bc /sway/commands | |
parent | eb9e77f4eae292da483191dcac18dbdfa50b984e (diff) |
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.
Diffstat (limited to 'sway/commands')
-rw-r--r-- | sway/commands/fullscreen.c | 10 |
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) { } } - bool is_fullscreen = false; - 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 is_fullscreen = container->pending.fullscreen_mode != FULLSCREEN_NONE; bool global = false; bool enable = !is_fullscreen; |