mirror of
https://github.com/emacs-exwm/exwm.git
synced 2024-11-27 14:57:59 +01:00
Be more precise when choosing the init hook
* exwm.el (exwm-enable): Run `exwm-init' in `after-make-frame-functions' only for emacsclient and `window-setup-hook' only for ordinary sessions.
This commit is contained in:
parent
088818fedb
commit
21351f6be3
1 changed files with 5 additions and 2 deletions
7
exwm.el
7
exwm.el
|
@ -726,8 +726,11 @@
|
||||||
;; Ignore unrecognized command line arguments. This can be helpful
|
;; Ignore unrecognized command line arguments. This can be helpful
|
||||||
;; when EXWM is launched by some session manager.
|
;; when EXWM is launched by some session manager.
|
||||||
(push #'vector command-line-functions)
|
(push #'vector command-line-functions)
|
||||||
(add-hook 'window-setup-hook #'exwm-init t) ;for Emacs
|
(if (display-graphic-p)
|
||||||
(add-hook 'after-make-frame-functions #'exwm-init t) ;for Emacs Client
|
;; emacs.
|
||||||
|
(add-hook 'window-setup-hook #'exwm-init t)
|
||||||
|
;; emacsclient.
|
||||||
|
(add-hook 'after-make-frame-functions #'exwm-init t))
|
||||||
(add-hook 'kill-emacs-hook #'exwm--server-stop)
|
(add-hook 'kill-emacs-hook #'exwm--server-stop)
|
||||||
(dolist (i exwm-blocking-subrs)
|
(dolist (i exwm-blocking-subrs)
|
||||||
(advice-add i :around #'exwm--server-eval-at)))))
|
(advice-add i :around #'exwm--server-eval-at)))))
|
||||||
|
|
Loading…
Reference in a new issue