From ecfd687977ec210bf22f1a73852bee2df0af0709 Mon Sep 17 00:00:00 2001 From: Ronan Pigott Date: Thu, 15 Apr 2021 17:01:27 -0700 Subject: 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. --- sway/commands/fullscreen.c | 10 +--------- 1 file changed, 1 insertion(+), 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; -- cgit v1.2.3