Fix buffer switch problems

* Prevent switching to floating windows or windows on other workspaces
* Provide a workaround for `ido-mode` (can be enabled with
  `(exwm-enable-ido-workaround)`)
This commit is contained in:
Chris Feng 2015-08-11 11:54:38 +08:00
parent b755296f54
commit 801185c7cc
2 changed files with 31 additions and 1 deletions

View file

@ -198,7 +198,13 @@
(exwm-layout--hide exwm--id)
(exwm-layout--show exwm--id (car windows))
(dolist (i (cdr windows))
(set-window-buffer i placeholder)))))))))
(set-window-buffer i placeholder))))))
;; Make sure windows floating / on other workspaces are excluded
(dolist (window (window-list frame 0))
(with-current-buffer (window-buffer window)
(when (and (eq major-mode 'exwm-mode)
(or exwm--floating-frame (not (eq frame exwm--frame))))
(set-window-buffer window placeholder)))))))
(defun exwm-layout--on-minibuffer-setup ()
"Refresh layout when minibuffer grows."