about summary refs log tree commit diff
path: root/exwm-input.el
diff options
context:
space:
mode:
Diffstat (limited to 'exwm-input.el')
-rw-r--r--exwm-input.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/exwm-input.el b/exwm-input.el
index 2368331cd0ae..9ba3502a4da0 100644
--- a/exwm-input.el
+++ b/exwm-input.el
@@ -688,9 +688,10 @@ Current buffer must be an `exwm-mode' buffer."
               (set-transient-map `(keymap (t . ,#'exwm-input--noop)))
               (exwm-input--unread-event event))
           ;; Fool some packages into thinking there is a change in the buffer.
-          (setq last-command #'exwm-input--noop)
-          (run-hooks 'pre-command-hook)
-          (run-hooks 'post-command-hook)))
+          (when event
+            (setq last-command #'exwm-input--noop)
+            (run-hooks 'pre-command-hook)
+            (run-hooks 'post-command-hook))))
       (xcb:+request exwm--connection
           (make-instance 'xcb:AllowEvents
                          :mode mode