Ignore non-exwm-mode' buffers in exwm-workspace-move-window'

* exwm-workspace.el (exwm-workspace-move-window): Ignore
non-`exwm-mode' buffers.
This commit is contained in:
Chris Feng 2019-08-25 00:00:00 +00:00
parent ddc22f2fed
commit d63dc6a82a

View file

@ -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)