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

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

[elpa] externals/exwm 2b183f2: Re-grab global keys on keyboard update


From: Chris Feng
Subject: [elpa] externals/exwm 2b183f2: Re-grab global keys on keyboard update
Date: Sun, 26 Nov 2017 07:29:40 -0500 (EST)

branch: externals/exwm
commit 2b183f221239a24da8d65cb9043f1010aa14c640
Author: Chris Feng <address@hidden>
Commit: Chris Feng <address@hidden>

    Re-grab global keys on keyboard update
    
    * exwm-input.el (exwm-input--on-keysyms-update): New function for
    re-grabbing global keys.
    (exwm-input--init): Register it to XELB.
---
 exwm-input.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/exwm-input.el b/exwm-input.el
index 7bcbc9e..097b392 100644
--- a/exwm-input.el
+++ b/exwm-input.el
@@ -127,6 +127,10 @@ ARGS are additional arguments to CALLBACK."
         (x-focus-frame (selected-frame))
         (select-window (selected-window))))))
 
+(defun exwm-input--on-keysyms-update ()
+  (let ((exwm-input--global-prefix-keys nil))
+    (exwm-input--update-global-prefix-keys)))
+
 (defun exwm-input--on-workspace-list-change ()
   "Run in `exwm-input--update-global-prefix-keys'."
   (dolist (f exwm-workspace--list)
@@ -702,7 +706,7 @@ Its usage is the same with 
`exwm-input-set-simulation-keys'."
 (defun exwm-input--init ()
   "Initialize the keyboard module."
   ;; Refresh keyboard mapping
-  (xcb:keysyms:init exwm--connection)
+  (xcb:keysyms:init exwm--connection #'exwm-input--on-keysyms-update)
   ;; Create the X window and intern the atom used to fetch timestamp.
   (setq exwm-input--timestamp-window (xcb:generate-id exwm--connection))
   (xcb:+request exwm--connection



reply via email to

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