diff options
author | Chris Feng <chris.w.feng@gmail.com> | 2016-03-20T04·03+0800 |
---|---|---|
committer | Chris Feng <chris.w.feng@gmail.com> | 2016-03-20T04·03+0800 |
commit | 44d05d2dd3e8214ef8815f7433758e9e155db3c9 (patch) | |
tree | e49ff0814a6234d60e5daecc83ab29bf2de89f8a /exwm-workspace.el | |
parent | 3cef44a6ca2093500b092f99dc588fb8bf9c184d (diff) | |
parent | 4d6b19aece7de841226b65d1945a7ac4c146c807 (diff) |
Merge branch 'medranocalvo/remember-last-buffer' into externals/exwm
Diffstat (limited to 'exwm-workspace.el')
-rw-r--r-- | exwm-workspace.el | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/exwm-workspace.el b/exwm-workspace.el index b2fb64830410..d8e84f3f87b3 100644 --- a/exwm-workspace.el +++ b/exwm-workspace.el @@ -235,6 +235,7 @@ The optional FORCE option is for internal use only." (declare-function exwm-layout--show "exwm-layout.el" (id &optional window)) (declare-function exwm-layout--hide "exwm-layout.el" (id)) (declare-function exwm-layout--refresh "exwm-layout.el") +(declare-function exwm-layout--other-buffer-predicate "exwm-layout.el" (buffer)) ;;;###autoload (defun exwm-workspace-move-window (index &optional id) @@ -346,11 +347,7 @@ The optional FORCE option is for internal use only." ;; Move the X window container. (if (= index exwm-workspace-current-index) (set-window-buffer (get-buffer-window (current-buffer) t) - (or (get-buffer "*scratch*") - (progn - (set-buffer-major-mode - (get-buffer-create "*scratch*")) - (get-buffer "*scratch*")))) + (other-buffer)) (bury-buffer) ;; Clear the 'exwm-selected-window' frame parameter. (set-frame-parameter frame 'exwm-selected-window nil)) @@ -684,6 +681,9 @@ The optional FORCE option is for internal use only." ;; The default behavior of `display-buffer' (indirectly called by ;; `minibuffer-completion-help') is not correct here. (cl-pushnew '(exwm-workspace--display-buffer) display-buffer-alist)) + ;; Prevent `other-buffer' from selecting already displayed EXWM buffers. + (modify-all-frames-parameters + '((buffer-predicate . exwm-layout--other-buffer-predicate))) ;; Configure workspaces (dolist (i exwm-workspace--list) (let ((outer-id (string-to-number (frame-parameter i 'outer-window-id))) |