emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/exwm 9eed52e 2/3: Avoid calling `x-focus-frame' on non-


From: Chris Feng
Subject: [elpa] externals/exwm 9eed52e 2/3: Avoid calling `x-focus-frame' on non-graphical frames
Date: Wed, 2 Oct 2019 12:34:37 -0400 (EDT)

branch: externals/exwm
commit 9eed52ee2b5a1366dfa5fdd3ad45328c554b356c
Author: Chris Feng <address@hidden>
Commit: Chris Feng <address@hidden>

    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.
---
 exwm-input.el     | 2 ++
 exwm-workspace.el | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/exwm-input.el b/exwm-input.el
index 7833130..2d3b481 100644
--- a/exwm-input.el
+++ b/exwm-input.el
@@ -1046,6 +1046,7 @@ where both ORIGINAL-KEY and SIMULATED-KEY are key 
sequences."
   (with-current-buffer
       (window-buffer (frame-selected-window exwm-workspace--current))
     (when (and (derived-mode-p 'exwm-mode)
+               (not (exwm-workspace--client-p))
                (eq exwm--selected-input-mode 'char-mode))
       (exwm-input--grab-keyboard exwm--id))))
 
@@ -1055,6 +1056,7 @@ where both ORIGINAL-KEY and SIMULATED-KEY are key 
sequences."
   (with-current-buffer
       (window-buffer (frame-selected-window exwm-workspace--current))
     (when (and (derived-mode-p 'exwm-mode)
+               (not (exwm-workspace--client-p))
                (eq exwm--selected-input-mode 'char-mode)
                (eq exwm--input-mode 'line-mode))
       (exwm-input--release-keyboard exwm--id))))
diff --git a/exwm-workspace.el b/exwm-workspace.el
index 4134318..736f46f 100644
--- a/exwm-workspace.el
+++ b/exwm-workspace.el
@@ -167,7 +167,8 @@ NIL if FRAME is not a workspace"
 
 (defsubst exwm-workspace--client-p (&optional 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
   "Keymap used for interactively selecting workspace.")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]