From 15ad591d978836b753839014f3c7ce67111763c1 Mon Sep 17 00:00:00 2001 From: Philip Date: Sun, 16 Aug 2015 18:05:47 +0000 Subject: [PATCH 1/2] 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. --- exwm-workspace.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exwm-workspace.el b/exwm-workspace.el index 09112d2..00f7326 100644 --- a/exwm-workspace.el +++ b/exwm-workspace.el @@ -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) + (with-current-buffer (exwm--id->buffer id) (let ((frame (elt exwm-workspace--list index))) - (with-current-buffer (exwm--id->buffer id) + (when (not (equal exwm--frame frame)) (setq exwm--frame frame) (exwm-workspace-rename-buffer (concat " " (replace-regexp-in-string "^\\s-*" "" (buffer-name)))) From 43b00d2f0fefd39ceddb62be792634aabc9e23ca Mon Sep 17 00:00:00 2001 From: Philip Date: Mon, 17 Aug 2015 06:40:43 +0000 Subject: [PATCH 2/2] fix buffer renaming per https://github.com/ch11ng/exwm/pull/30 --- exwm-workspace.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/exwm-workspace.el b/exwm-workspace.el index 00f7326..7ac1fec 100644 --- a/exwm-workspace.el +++ b/exwm-workspace.el @@ -171,9 +171,11 @@ The optional FORCE option is for internal use only." (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) - (exwm-workspace-rename-buffer - (concat " " (replace-regexp-in-string "^\\s-*" "" (buffer-name)))) (if exwm--floating-frame ;; Move the floating frame is enough (progn