[PATCH] [xserver] XInput extended button press/release report regression

Magnus Vigerlöf Magnus.Vigerlof at home.se
Sat Nov 24 13:59:12 PST 2007


We (linuxwacom) had some strange reports about button presses that got out of 
sync with the actual button mapping for the InputDevice. This has shown up 
starting with xserver 1.4.

I've tracked it down to a button conversion made twice only for extended input 
events, which was introduced with xserver 1.4/input rework.

The two places where the conversion is made today are here:
./dix/getevents.c:656 in GetPointerEvents
./Xi/exevents.c:237 in ProcessOtherEvent
Remove duplicate button press/release translation for extended events.
diff --git a/dix/getevents.c b/dix/getevents.c
index 3754c72..564472e 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -677,7 +677,7 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int 
type, int buttons,
                 kbp->type = DeviceButtonPress;
             else if (type == ButtonRelease)
                 kbp->type = DeviceButtonRelease;
-            kbp->detail = pDev->button->map[buttons];
+            kbp->detail = buttons;
         kbp->root_x = x;

More information about the xorg mailing list