diff options
author | Chris Feng <chris.w.feng@gmail.com> | 2019-02-06T00·00+0000 |
---|---|---|
committer | Chris Feng <chris.w.feng@gmail.com> | 2019-02-06T00·00+0000 |
commit | 225c68d4ce5fd3c9726b27eb6fc3ab2b223d2ec3 (patch) | |
tree | 34488c76aad3483ea330b53f3660e435118763b7 /exwm-input.el | |
parent | e15728203834ac85a51997366d0a019acef56d6f (diff) | |
parent | cd7b32d1c203b87d428ea75e5a5e1452d8236742 (diff) |
Merge branch 'retain-echo-area-until-input' of https://github.com/medranocalvo/exwm into medranocalvo/retain-echo-area-until-input
Diffstat (limited to 'exwm-input.el')
-rw-r--r-- | exwm-input.el | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/exwm-input.el b/exwm-input.el index 04020acfaf2e..d0ae4ad81250 100644 --- a/exwm-input.el +++ b/exwm-input.el @@ -140,6 +140,9 @@ defined in `exwm-mode-map' here." (defvar exwm-input--update-focus-window nil "The (Emacs) window to be focused. This value should always be overwritten.") +(defvar exwm-input--event-hook nil + "Hook to run when EXWM receives an event.") + (defvar exwm-workspace--current) (declare-function exwm-floating--do-moveresize "exwm-floating.el" (data _synthetic)) @@ -430,7 +433,8 @@ ARGS are additional arguments to CALLBACK." (setq mode xcb:Allow:ReplayPointer)))) (xcb:+request exwm--connection (make-instance 'xcb:AllowEvents :mode mode :time xcb:Time:CurrentTime)) - (xcb:flush exwm--connection))) + (xcb:flush exwm--connection)) + (run-hooks 'exwm-input--event-hook)) (defun exwm-input--on-KeyPress (data _synthetic) "Handle KeyPress event." @@ -444,7 +448,8 @@ ARGS are additional arguments to CALLBACK." (exwm-input--on-KeyPress-line-mode obj data)) (char-mode (exwm-input--on-KeyPress-char-mode obj data))) - (exwm-input--on-KeyPress-char-mode obj)))) + (exwm-input--on-KeyPress-char-mode obj))) + (run-hooks 'exwm-input--event-hook)) (defun exwm-input--on-CreateNotify (data _synthetic) "Handle CreateNotify events." |