about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAdrián Medraño Calvo <adrian@medranocalvo.com>2023-06-09T00·00+0000
committerAdrián Medraño Calvo <adrian@medranocalvo.com>2023-06-09T00·00+0000
commita417f0d45e73f75028ba17ae49c664e3548deeba (patch)
treef268abd4e328f4797f5a03f4f9a6974365b6f472
parentb62d5e79b0c1799f2cd941b4cec5bf8492cb322c (diff)
parent4d5b0e81cd0f990c6bb1ef4d17dd7e5e1f63ba6b (diff)
Merge branch 'nbarrientos.github.com/post-command-hook' into externals/exwm
-rw-r--r--exwm-input.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/exwm-input.el b/exwm-input.el
index 79bc78ef0fe9..ab22d60a3828 100644
--- a/exwm-input.el
+++ b/exwm-input.el
@@ -452,9 +452,12 @@ ARGS are additional arguments to CALLBACK."
             (t
              ;; Replay this event by default.
              (setq fake-last-command t)
-             (setq mode xcb:Allow:ReplayPointer))))
-    (when fake-last-command
-      (exwm-input--fake-last-command))
+             (setq mode xcb:Allow:ReplayPointer)))
+      (when fake-last-command
+        (if buffer
+            (with-current-buffer buffer
+              (exwm-input--fake-last-command))
+          (exwm-input--fake-last-command))))
     (xcb:+request exwm--connection
         (make-instance 'xcb:AllowEvents :mode mode :time xcb:Time:CurrentTime))
     (xcb:flush exwm--connection))