[PATCH] [xserver] XInput extended button press/release report regression
daniel at fooishbar.org
Sat Nov 24 16:49:50 PST 2007
On Sat, Nov 24, 2007 at 10:59:12PM +0100, Magnus Vigerlöf wrote:
> 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;
Thanks, but the patch should be the other one: core events should get
the button map from the extended mouse, and ProcessOtherInput shouldn't
modify the detail field at all.
PS: I'm trying to fix the absolute conversion and a really bad memory
leak before I push 1.4.1 out. Sorry.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 189 bytes
Desc: Digital signature
More information about the xorg