Avoid reusing dedicated window

* exwm-floating.el (exwm-floating--unset-floating):
* exwm-manage.el (exwm-manage--on-MapRequest):
Do not select a dedicated window for displaying a buffer.
This commit is contained in:
Chris Feng 2017-08-31 00:58:39 +08:00
parent 4eda6dde41
commit 46dfaeb031
2 changed files with 2 additions and 8 deletions

View file

@ -340,11 +340,7 @@ context of the corresponding buffer.")
exwm--frame exwm-workspace--current)) exwm--frame exwm-workspace--current))
;; Only show X windows in normal state. ;; Only show X windows in normal state.
(unless (exwm-layout--iconic-state-p) (unless (exwm-layout--iconic-state-p)
;; Show it in the selected Emacs window but skip the mini-window. (pop-to-buffer-same-window buffer)))
(let ((window (or (minibuffer-selected-window)
(frame-selected-window exwm-workspace--current))))
(set-window-buffer window buffer)
(select-window window))))
(with-current-buffer (exwm--id->buffer id) (with-current-buffer (exwm--id->buffer id)
(run-hooks 'exwm-floating-exit-hook))) (run-hooks 'exwm-floating-exit-hook)))

View file

@ -682,9 +682,7 @@ border-width: %d; sibling: #x%x; stack-mode: %d"
(if (exwm-layout--iconic-state-p) (if (exwm-layout--iconic-state-p)
;; State change: iconic => normal. ;; State change: iconic => normal.
(when (eq exwm--frame exwm-workspace--current) (when (eq exwm--frame exwm-workspace--current)
(set-window-buffer (frame-selected-window exwm--frame) (pop-to-buffer-same-window (current-buffer)))
(current-buffer))
(select-window (frame-selected-window exwm--frame)))
(exwm--log "#x%x is already managed" window))) (exwm--log "#x%x is already managed" window)))
(if (/= exwm--root parent) (if (/= exwm--root parent)
(progn (xcb:+request exwm--connection (progn (xcb:+request exwm--connection