emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/exwm 4d5b0e81cd 1/2: Make sure the buffer that generate


From: ELPA Syncer
Subject: [elpa] externals/exwm 4d5b0e81cd 1/2: Make sure the buffer that generates the event is current
Date: Fri, 9 Jun 2023 12:57:56 -0400 (EDT)

branch: externals/exwm
commit 4d5b0e81cd0f990c6bb1ef4d17dd7e5e1f63ba6b
Author: Nacho Barrientos <nacho.barrientos@cern.ch>
Commit: Adrián Medraño Calvo <adrian@medranocalvo.com>

    Make sure the buffer that generates the event is current
    
    * exwm-input.el (exwm-input--on-ButtonPress): Set current buffer
    when running pre- and post-command hooks.
---
 exwm-input.el | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/exwm-input.el b/exwm-input.el
index 79bc78ef0f..ab22d60a38 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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]