Avoid calling `x-focus-frame' on non-graphical frames
* exwm-workspace.el (exwm-workspace--client-p): Also account for non-graphical frames. * exwm-input.el (exwm-input--on-minibuffer-setup) (exwm-input--on-minibuffer-exit): Exclude emacsclient frames.
This commit is contained in:
parent
7778766af8
commit
9eed52ee2b
2 changed files with 4 additions and 1 deletions
|
@ -1046,6 +1046,7 @@ where both ORIGINAL-KEY and SIMULATED-KEY are key sequences."
|
||||||
(with-current-buffer
|
(with-current-buffer
|
||||||
(window-buffer (frame-selected-window exwm-workspace--current))
|
(window-buffer (frame-selected-window exwm-workspace--current))
|
||||||
(when (and (derived-mode-p 'exwm-mode)
|
(when (and (derived-mode-p 'exwm-mode)
|
||||||
|
(not (exwm-workspace--client-p))
|
||||||
(eq exwm--selected-input-mode 'char-mode))
|
(eq exwm--selected-input-mode 'char-mode))
|
||||||
(exwm-input--grab-keyboard exwm--id))))
|
(exwm-input--grab-keyboard exwm--id))))
|
||||||
|
|
||||||
|
@ -1055,6 +1056,7 @@ where both ORIGINAL-KEY and SIMULATED-KEY are key sequences."
|
||||||
(with-current-buffer
|
(with-current-buffer
|
||||||
(window-buffer (frame-selected-window exwm-workspace--current))
|
(window-buffer (frame-selected-window exwm-workspace--current))
|
||||||
(when (and (derived-mode-p 'exwm-mode)
|
(when (and (derived-mode-p 'exwm-mode)
|
||||||
|
(not (exwm-workspace--client-p))
|
||||||
(eq exwm--selected-input-mode 'char-mode)
|
(eq exwm--selected-input-mode 'char-mode)
|
||||||
(eq exwm--input-mode 'line-mode))
|
(eq exwm--input-mode 'line-mode))
|
||||||
(exwm-input--release-keyboard exwm--id))))
|
(exwm-input--release-keyboard exwm--id))))
|
||||||
|
|
|
@ -167,7 +167,8 @@ NIL if FRAME is not a workspace"
|
||||||
|
|
||||||
(defsubst exwm-workspace--client-p (&optional frame)
|
(defsubst exwm-workspace--client-p (&optional frame)
|
||||||
"Return non-nil if FRAME is an emacsclient frame."
|
"Return non-nil if FRAME is an emacsclient frame."
|
||||||
(frame-parameter frame 'client))
|
(or (frame-parameter frame 'client)
|
||||||
|
(not (display-graphic-p frame))))
|
||||||
|
|
||||||
(defvar exwm-workspace--switch-map nil
|
(defvar exwm-workspace--switch-map nil
|
||||||
"Keymap used for interactively selecting workspace.")
|
"Keymap used for interactively selecting workspace.")
|
||||||
|
|
Loading…
Reference in a new issue