branch: externals/exwm commit 6027cd80b9c83d1cf4d035bcd3801d4d50fe9196 Author: Daniel Mendler <m...@daniel-mendler.de> Commit: Daniel Mendler <m...@daniel-mendler.de>
exwm--init: Use exwm--find-x-frame * exwm.el (exwm--init): Use exwm--find-x-frame instead of selected-frame. --- exwm.el | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/exwm.el b/exwm.el index 5c20c95025..7e7605978f 100644 --- a/exwm.el +++ b/exwm.el @@ -914,13 +914,12 @@ manager. If t, replace it, if nil, abort and ask the user if `ask'." FRAME, if given, indicates the X display EXWM should manage." (exwm--log "%s" frame) (cl-assert (not exwm--connection)) - (if frame - ;; The frame might not be selected if it's created by emacsclient. - (select-frame-set-input-focus frame) - (setq frame (selected-frame))) - (when (not (eq 'x (framep frame))) + (setq frame (or frame (exwm--find-x-frame))) + (unless (eq 'x (framep frame)) (message "[EXWM] Not running under X environment") (cl-return-from exwm--init)) + ;; The frame might not be selected if it's created by emacsclient. + (select-frame-set-input-focus frame) (condition-case err (progn ;; Never initialize again