about summary refs log tree commit diff
path: root/exwm-workspace.el
diff options
context:
space:
mode:
Diffstat (limited to 'exwm-workspace.el')
-rw-r--r--exwm-workspace.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/exwm-workspace.el b/exwm-workspace.el
index f536bc5a81ad..8aa04ddf2a67 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)