]> git.sur5r.net Git - i3/i3/commitdiff
Merge branch 'master' into next
authorMichael Stapelberg <michael@stapelberg.de>
Sun, 16 Sep 2012 15:59:55 +0000 (17:59 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Sun, 16 Sep 2012 15:59:55 +0000 (17:59 +0200)
src/scratchpad.c

index 5072280bf35b47fbc1b99c55e0f234c83a445740..16e26ceebe32b0964380b039e8a710fabe9274c8 100644 (file)
@@ -78,6 +78,16 @@ void scratchpad_show(Con *con) {
     Con *__i3_scratch = workspace_get("__i3_scratch", NULL);
     Con *floating;
 
+    /* If the current con or any of its parents are in fullscreen mode, we
+     * first need to disable it before showing the scratchpad con. */
+    Con *fs = focused;
+    while (fs && fs->fullscreen_mode == CF_NONE)
+        fs = fs->parent;
+
+    if (fs->type != CT_WORKSPACE) {
+        con_toggle_fullscreen(focused, CF_OUTPUT);
+    }
+
     /* If this was 'scratchpad show' without criteria, we check if the
      * currently focused window is a scratchpad window and should be hidden
      * again. */