summaryrefslogtreecommitdiff
path: root/sway/commands/fullscreen.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/commands/fullscreen.c')
-rw-r--r--sway/commands/fullscreen.c7
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) {
"Can't fullscreen an empty workspace");
}
+ // If in the scratchpad, operate on the highest container
+ if (container && !container->workspace) {
+ while (container->parent) {
+ container = container->parent;
+ }
+ }
+
bool is_fullscreen = container &&
container->fullscreen_mode != FULLSCREEN_NONE;
bool global = false;