mirror of
https://github.com/emacs-exwm/exwm.git
synced 2024-11-23 21:17:59 +01:00
Re-enable complete refresh of keyboard mapping
Since the performance of `xcb:keysyms:update-keyboard-mapping` is no longer an problem, we allow every possible refresh of keyboard mapping again.
This commit is contained in:
parent
5f9f673791
commit
7032ee7003
1 changed files with 5 additions and 12 deletions
|
@ -149,20 +149,13 @@ It's updated in several occasions, and only used by `exwm-input--set-focus'.")
|
||||||
((= request xcb:Mapping:Modifier)
|
((= request xcb:Mapping:Modifier)
|
||||||
;; Modifier keys changed
|
;; Modifier keys changed
|
||||||
(exwm--log "Update modifier mapping")
|
(exwm--log "Update modifier mapping")
|
||||||
(xcb:keysyms:update-modifier-mapping exwm--connection)
|
(xcb:keysyms:update-modifier-mapping exwm--connection))
|
||||||
)
|
|
||||||
((= request xcb:Mapping:Keyboard)
|
((= request xcb:Mapping:Keyboard)
|
||||||
;; Only update changed keys
|
;; Only update changed keys
|
||||||
(with-slots (min-keycode max-keycode)
|
(exwm--log "Update keyboard mapping: %d ~ %d"
|
||||||
(xcb:get-setup exwm--connection)
|
first-keycode (+ first-keycode count))
|
||||||
;; Since this operation is quite time-consuming, a complete refresh
|
(xcb:keysyms:update-keyboard-mapping exwm--connection
|
||||||
;; is forbidden as it's unlikely to bring any useful information
|
first-keycode count))))))
|
||||||
(unless (and (= min-keycode first-keycode)
|
|
||||||
(= max-keycode (+ first-keycode count -1)))
|
|
||||||
(exwm--log "Update keyboard mapping: %d ~ %d"
|
|
||||||
first-keycode (+ first-keycode count))
|
|
||||||
(xcb:keysyms:update-keyboard-mapping exwm--connection
|
|
||||||
first-keycode count))))))))
|
|
||||||
|
|
||||||
(defun exwm-input--on-ButtonPress (data synthetic)
|
(defun exwm-input--on-ButtonPress (data synthetic)
|
||||||
"Handle ButtonPress event."
|
"Handle ButtonPress event."
|
||||||
|
|
Loading…
Reference in a new issue