Fix bug when moving a window to the current workspace

* exwm-workspace.el (exwm-workspace-move-window): Run
          reparenting code when moving a window to the current workspace.
This commit is contained in:
Philip 2015-08-16 18:05:47 +00:00
parent 7bfd429d52
commit 15ad591d97

View file

@ -168,9 +168,9 @@ The optional FORCE option is for internal use only."
(unless id (setq id (exwm--buffer->id (window-buffer))))
(unless (and (<= 0 index) (< index exwm-workspace-number))
(user-error "[EXWM] Workspace index out of range: %d" index))
(when (/= exwm-workspace-current-index index)
(let ((frame (elt exwm-workspace--list index)))
(with-current-buffer (exwm--id->buffer id)
(let ((frame (elt exwm-workspace--list index)))
(when (not (equal exwm--frame frame))
(setq exwm--frame frame)
(exwm-workspace-rename-buffer
(concat " " (replace-regexp-in-string "^\\s-*" "" (buffer-name))))