about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChris Feng <chris.w.feng@gmail.com>2019-02-05T00·00+0000
committerChris Feng <chris.w.feng@gmail.com>2019-02-05T00·00+0000
commit44629818bacf3e3a10a37e570fdee2e963dbcc7b (patch)
treeb2c6ab7b0a68395d8fb947895a3443620a62e8c4
parent65d371d55f22109a6ab886df4c7dfcdb4b893e6c (diff)
Scan for existing X windows only after running `exwm-init-hook'
* exwm.el (exwm-init): Delay the call to `exwm-manage--scan' since
managing existing X windows too early may result in issues like losing
input focus.
-rw-r--r--exwm.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/exwm.el b/exwm.el
index 6f6458da7cb1..7affebfff2ba 100644
--- a/exwm.el
+++ b/exwm.el
@@ -833,9 +833,9 @@ manager.  If t, replace it, if nil, abort and ask the user if `ask'."
         (exwm--unlock)
         (exwm-workspace--post-init)
         (exwm-input--post-init)
+        (run-hooks 'exwm-init-hook)
         ;; Manage existing windows
-        (exwm-manage--scan)
-        (run-hooks 'exwm-init-hook))
+        (exwm-manage--scan))
     ((quit error)
      (exwm-exit)
      ;; Rethrow error