branch: externals/exwm
commit d63dc6a82a44c1e918b93c4f50e5d4274ad6d21a
Author: Chris Feng <chris.w.f...@gmail.com>
Commit: Chris Feng <chris.w.f...@gmail.com>

    Ignore non-`exwm-mode' buffers in `exwm-workspace-move-window'
    
    * exwm-workspace.el (exwm-workspace-move-window): Ignore
    non-`exwm-mode' buffers.
---
 exwm-workspace.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/exwm-workspace.el b/exwm-workspace.el
index f536bc5..8aa04dd 100644
--- a/exwm-workspace.el
+++ b/exwm-workspace.el
@@ -804,7 +804,7 @@ INDEX must not exceed the current number of workspaces."
                          :data desktop)))))
 
 ;;;###autoload
-(defun exwm-workspace-move-window (frame-or-index &optional id)
+(cl-defun exwm-workspace-move-window (frame-or-index &optional id)
   "Move window ID to workspace FRAME-OR-INDEX."
   (interactive (list
                 (cond
@@ -819,6 +819,8 @@ INDEX must not exceed the current number of workspaces."
   (let ((frame (exwm-workspace--workspace-from-frame-or-index frame-or-index))
         old-frame container)
     (unless id (setq id (exwm--buffer->id (window-buffer))))
+    (unless id
+      (cl-return-from exwm-workspace-move-window))
     (exwm--log "Moving #x%x to %s" id frame-or-index)
     (with-current-buffer (exwm--id->buffer id)
       (unless (eq exwm--frame frame)

Reply via email to