Skip to content

Commit 10766e2

Browse files
committed
Support starting EXWM from Emacs server not in daemon mode
* exwm.el (exwm-enable): Start EXWM from `window-setup-hook' or `after-make-frame-functions', whichever comes first.
1 parent f167bc9 commit 10766e2

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

exwm.el

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -892,10 +892,11 @@ manager. If t, replace it, if nil, abort and ask the user if `ask'."
892892
;; Ignore unrecognized command line arguments. This can be helpful
893893
;; when EXWM is launched by some session manager.
894894
(push #'vector command-line-functions)
895-
(add-hook (if (daemonp)
896-
'after-make-frame-functions ;emacsclient
897-
'window-setup-hook) ;emacs
898-
#'exwm-init t)
895+
;; In case EXWM is to be started from a graphical Emacs instance.
896+
(add-hook 'window-setup-hook #'exwm-init t)
897+
;; In case EXWM is to be started with emacsclient.
898+
(add-hook 'after-make-frame-functions #'exwm-init t)
899+
;; Manage the subordinate Emacs server.
899900
(add-hook 'kill-emacs-hook #'exwm--server-stop)
900901
(dolist (i exwm-blocking-subrs)
901902
(advice-add i :around #'exwm--server-eval-at)))))

0 commit comments

Comments
 (0)