branch: externals/xelb
commit b1e83e8779d48fe51e235bb73f9dbc1ff1f02626
Author: Chris Feng <chris.w.f...@gmail.com>
Commit: Chris Feng <chris.w.f...@gmail.com>

    Fix extension event number
    
    * xcb.el (xcb:-connection-filter): Add the second byte to the extension
    event number.
---
 xcb.el |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/xcb.el b/xcb.el
index a03dbb4..4cba47c 100644
--- a/xcb.el
+++ b/xcb.el
@@ -332,6 +332,9 @@ Concurrency is disabled as it breaks the orders of errors, 
replies and events."
                (when (/= 0 (logand x #x80)) ;synthetic event
                  (setq synthetic t
                        x (logand x #x7f))) ;low 7 bits is the event number
+               (when (<= 64 x 127)
+                 ;; Extension event; add the second byte.
+                 (cl-incf x (aref cache 1)))
                (setq listener
                      (plist-get (slot-value connection 'event-plist) x))
                (when listener

Reply via email to