about summary refs log tree commit diff
path: root/exwm-manage.el
diff options
context:
space:
mode:
authorChris Feng <chris.w.feng@gmail.com>2015-08-12T10·09+0800
committerChris Feng <chris.w.feng@gmail.com>2015-08-12T10·09+0800
commit04e426961736c67046fa3809fc14f1ac027dae77 (patch)
tree7a7515c778e25f741ad98ca5aec3c22c9b0e9cee /exwm-manage.el
parent1ce18afd0559bacc3a7c43f5a73342814a5b176f (diff)
Improve input focus switch mechanism
This commit should fix most input focus bugs (especially those related to
floating windows). The actual settings of input focus are delayed to exclude
redundant event. Dead code since this commit is removed.

This commit also fixes a bug for non-floating windows converted form floating
state. The workaround for `ido-mode` is also improved to properly handle
`exwm-mode` buffers.
Diffstat (limited to 'exwm-manage.el')
-rw-r--r--exwm-manage.el11
1 files changed, 2 insertions, 9 deletions
diff --git a/exwm-manage.el b/exwm-manage.el
index fc61e50744..d1736ff9a4 100644
--- a/exwm-manage.el
+++ b/exwm-manage.el
@@ -183,15 +183,8 @@ corresponding buffer.")
         (let ((floating exwm--floating-frame))
           (kill-buffer)
           (when floating
-            (if (eq 'exwm-mode
-                    (with-current-buffer
-                        (window-buffer
-                         (frame-first-window exwm-workspace--current))
-                      major-mode))
-                ;; Input focus is to be set on a window
-                (x-focus-frame exwm-workspace--current)
-              ;; Set input focus on a frame
-              (select-frame-set-input-focus exwm-workspace--current))))))))
+            (select-window
+             (frame-selected-window exwm-workspace--current))))))))
 
 (defun exwm-manage--scan ()
   "Search for existing windows and try to manage them."