about summary refs log tree commit diff
path: root/exwm-workspace.el
diff options
context:
space:
mode:
authorChris Feng <chris.w.feng@gmail.com>2016-05-21T04·50+0800
committerChris Feng <chris.w.feng@gmail.com>2016-05-21T04·50+0800
commitdc0c0f5131296f31b02019d1d928a0a17f085818 (patch)
treeb36d743d26eba11180c14cb6bff38c0ac1c4fb87 /exwm-workspace.el
parent2dcb26ce9d4411200c635f19c372fc6c34f3bafe (diff)
Always add `exwm-workspace--on-focus-in'
* exwm-workspace.el (exwm-workspace--init):
`exwm-workspace--on-focus-in' should always be added to `focus-in-hook'.
Diffstat (limited to 'exwm-workspace.el')
-rw-r--r--exwm-workspace.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/exwm-workspace.el b/exwm-workspace.el
index 60cf9dd777..124c6810bd 100644
--- a/exwm-workspace.el
+++ b/exwm-workspace.el
@@ -689,8 +689,6 @@ The optional FORCE option is for internal use only."
     (add-hook 'minibuffer-exit-hook #'exwm-workspace--on-minibuffer-exit)
     (run-with-idle-timer 0 t #'exwm-workspace--on-echo-area-dirty)
     (add-hook 'echo-area-clear-hook #'exwm-workspace--on-echo-area-clear)
-    ;; Handle unexpected frame switch.
-    (add-hook 'focus-in-hook #'exwm-workspace--on-focus-in)
     ;; Create workspace frames.
     (dotimes (_ exwm-workspace-number)
       (push (make-frame `((window-system . x)
@@ -700,6 +698,8 @@ The optional FORCE option is for internal use only."
     ;; The default behavior of `display-buffer' (indirectly called by
     ;; `minibuffer-completion-help') is not correct here.
     (cl-pushnew '(exwm-workspace--display-buffer) display-buffer-alist))
+  ;; Handle unexpected frame switch.
+  (add-hook 'focus-in-hook #'exwm-workspace--on-focus-in)
   ;; Prevent `other-buffer' from selecting already displayed EXWM buffers.
   (modify-all-frames-parameters
    '((buffer-predicate . exwm-layout--other-buffer-predicate)))