Simplify input handling
No functional change. * exwm-input.el (exwm-input--current-input-mode): New function indicating keyboard input mode. (exwm-input--on-KeyPress, exwm-input--update-mode-line): Use `exwm-input--current-input-mode'. (exwm-input-grab-keyboard, exwm-input-release-keyboard) (exwm-input--update-mode-line): Simplify. * exwh-core.el (exwm--on-KeyPress): Remove variable, use `exwm--keyboard-grabbed' and `exwm-input--current-input-mode' instead.
This commit is contained in:
parent
472f7cb82b
commit
dff1ef6a3c
3 changed files with 33 additions and 26 deletions
|
|
@ -45,6 +45,7 @@
|
|||
(defvar exwm-layout--timer nil "Timer used to track echo area changes.")
|
||||
|
||||
(defvar exwm-workspace--current)
|
||||
(declare-function exwm-input--current-input-mode "exwm-input.el")
|
||||
(declare-function exwm-input--release-keyboard "exwm-input.el")
|
||||
(declare-function exwm-input--grab-keyboard "exwm-input.el")
|
||||
(declare-function exwm-input-grab-keyboard "exwm-input.el")
|
||||
|
|
@ -199,7 +200,7 @@
|
|||
(make-instance 'xcb:ewmh:set-_NET_WM_STATE :window exwm--id :data []))
|
||||
(xcb:flush exwm--connection)
|
||||
(set-window-dedicated-p (get-buffer-window) nil)
|
||||
(when exwm--keyboard-grabbed
|
||||
(when (eq 'line-mode (exwm-input--current-input-mode))
|
||||
(exwm-input--grab-keyboard exwm--id))))
|
||||
|
||||
;;;###autoload
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue