about summary refs log tree commit diff
path: root/exwm-layout.el
diff options
context:
space:
mode:
authorChris Feng <chris.w.feng@gmail.com>2015-08-11T03·54+0800
committerChris Feng <chris.w.feng@gmail.com>2015-08-11T03·54+0800
commit801185c7cc2c257ac2e8ed9a3aa8e8119c56ad1f (patch)
tree88b701c22920f07029c1b4a057ef48ef32ac5046 /exwm-layout.el
parentb755296f547938d0f97d6aa49b8cb0d726de9eb9 (diff)
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)`)
Diffstat (limited to 'exwm-layout.el')
-rw-r--r--exwm-layout.el8
1 files changed, 7 insertions, 1 deletions
diff --git a/exwm-layout.el b/exwm-layout.el
index 5d056afeb5..f2d4eb0cbe 100644
--- a/exwm-layout.el
+++ b/exwm-layout.el
@@ -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."