about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--exwm-workspace.el7
1 files changed, 3 insertions, 4 deletions
diff --git a/exwm-workspace.el b/exwm-workspace.el
index 958511270b8d..a99186ceb0f9 100644
--- a/exwm-workspace.el
+++ b/exwm-workspace.el
@@ -746,10 +746,9 @@ INDEX must not exceed the current number of workspaces."
                                        (frame-root-window
                                         exwm--floating-frame)))))
           ;; Move the X window container.
-          (if (eq frame exwm-workspace--current)
-              (set-window-buffer (get-buffer-window (current-buffer) t)
-                                 (other-buffer))
-            (bury-buffer)
+          (set-window-buffer (get-buffer-window (current-buffer) t)
+                             (other-buffer))
+          (unless (eq frame exwm-workspace--current)
             ;; Clear the 'exwm-selected-window' frame parameter.
             (set-frame-parameter frame 'exwm-selected-window nil))
           (exwm-layout--hide id)