diff options
Diffstat (limited to 'sway/commands/fullscreen.c')
-rw-r--r-- | sway/commands/fullscreen.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sway/commands/fullscreen.c b/sway/commands/fullscreen.c index 52248ce4..a268ba03 100644 --- a/sway/commands/fullscreen.c +++ b/sway/commands/fullscreen.c | |||
@@ -26,6 +26,13 @@ struct cmd_results *cmd_fullscreen(int argc, char **argv) { | |||
26 | "Can't fullscreen an empty workspace"); | 26 | "Can't fullscreen an empty workspace"); |
27 | } | 27 | } |
28 | 28 | ||
29 | // If in the scratchpad, operate on the highest container | ||
30 | if (container && !container->workspace) { | ||
31 | while (container->parent) { | ||
32 | container = container->parent; | ||
33 | } | ||
34 | } | ||
35 | |||
29 | bool is_fullscreen = container && | 36 | bool is_fullscreen = container && |
30 | container->fullscreen_mode != FULLSCREEN_NONE; | 37 | container->fullscreen_mode != FULLSCREEN_NONE; |
31 | bool global = false; | 38 | bool global = false; |