Merge branch 'move-window-fix' of https://github.com/pipcet/exwm into pipcet-move-window-fix

This commit is contained in:
Chris Feng 2015-08-17 17:50:50 +08:00
commit 2d07429d0f

View file

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