[PATCH] [xserver] XInput extended button press/release report regression
Magnus.Vigerlof at home.se
Sun Nov 25 14:20:21 PST 2007
On söndag 25 november 2007, Daniel Stone wrote:
> 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.
Ah, ok. As long as it's only made once... I'm unsure if ProcessOtherInput is
the only place where this extra conversion is made, so I'm afraid I'll have
to leave that to someone who know the input processing part a little better
> PS: I'm trying to fix the absolute conversion and a really bad memory
> leak before I push 1.4.1 out. Sorry.
Good, I'm looking forward to get back that conversion for my tablet again :)
More information about the xorg