about summary refs log tree commit diff
path: root/exwm.el
diff options
context:
space:
mode:
Diffstat (limited to 'exwm.el')
-rw-r--r--exwm.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/exwm.el b/exwm.el
index ec49748c2dc8..9ebfabf9e817 100644
--- a/exwm.el
+++ b/exwm.el
@@ -432,7 +432,9 @@
           (make-frame))
          ((and (> current requested)
                (> current 1))
-          (delete-frame (car (last exwm-workspace--list)))))))
+          (let ((frame (car (last exwm-workspace--list))))
+            (exwm-workspace--get-remove-frame-next-workspace frame)
+            (delete-frame frame))))))
      ;; _NET_CURRENT_DESKTOP.
      ((= type xcb:Atom:_NET_CURRENT_DESKTOP)
       (exwm-workspace-switch (elt data 0)))