]> git.sur5r.net Git - i3/i3/blobdiff - src/workspace.c
Merge branch 'master' into next
[i3/i3] / src / workspace.c
index 872ec768d99ad64038d35df85031db72bf463145..ed00c9a7c89f12ef54e00be8f3b4240ccaee6cdb 100644 (file)
@@ -358,11 +358,16 @@ static void _workspace_show(Con *workspace) {
     /* Remember currently focused workspace for switching back to it later with
      * the 'workspace back_and_forth' command.
      * NOTE: We have to duplicate the name as the original will be freed when
-     * the corresponding workspace is cleaned up. */
-
-    FREE(previous_workspace_name);
-    if (current)
-        previous_workspace_name = sstrdup(current->name);
+     * the corresponding workspace is cleaned up.
+     * NOTE: Internal cons such as __i3_scratch (when a scratchpad window is
+     * focused) are skipped, see bug #868. */
+    if (current && !con_is_internal(current)) {
+        FREE(previous_workspace_name);
+        if (current) {
+            previous_workspace_name = sstrdup(current->name);
+            DLOG("Setting previous_workspace_name = %s\n", previous_workspace_name);
+        }
+    }
 
     workspace_reassign_sticky(workspace);