[PATCH] evdev: pass the valuators to the X server for ButtonPress/Release events.
Oliver McFadden
oliver.mcfadden at nokia.com
Thu Feb 25 22:28:36 PST 2010
On Fri, 2010-02-26 at 01:48 +0100, ext Peter Hutterer wrote:
> On Thu, Feb 25, 2010 at 10:21:07AM +0200, Oliver McFadden wrote:
> > Previously this was not implemented because it requires the X server has
> > the xf86PostButtonEventP() function which was not released at the time.
> >
> > Signed-off-by: Oliver McFadden <oliver.mcfadden at nokia.com>
> > ---
> > src/evdev.c | 7 ++-----
> > 1 files changed, 2 insertions(+), 5 deletions(-)
> >
> > diff --git a/src/evdev.c b/src/evdev.c
> > index 3051462..b5635e5 100644
> > --- a/src/evdev.c
> > +++ b/src/evdev.c
> > @@ -655,11 +655,8 @@ static void EvdevPostQueuedEvents(InputInfoPtr pInfo, int *num_v, int *first_v,
> > pEvdev->queue[i].val);
> > break;
> > case EV_QUEUE_BTN:
> > - /* FIXME: Add xf86PostButtonEventP to the X server so that we may
> > - * pass the valuators on ButtonPress/Release events, too. Currently
> > - * only MotionNotify events contain the pointer position. */
> > - xf86PostButtonEvent(pInfo->dev, 0, pEvdev->queue[i].key,
> > - pEvdev->queue[i].val, 0, 0);
> > + xf86PostButtonEventP(pInfo->dev, 0, pEvdev->queue[i].key,
> > + pEvdev->queue[i].val, *first_v, *num_v, v);
> > break;
> > }
> > }
> > --
> > 1.6.1
>
> Are you guys using XI or XI2? Because you won't see a change in core events
> with the change above. You're still posting MotionNotify events before, so
> adding the valuators to the event have little result for core clients. Only
> XI events would have these new valuators included.
Well, the X server in Maemo 5 is a bit older and has some incomplete
version of XI2, so most programs are still using XI from what I
remember.
> I'd prefer a change that skips the xf86PostMotionEvent so that we just send
> the button event with the new coordinates.
Wouldn't this break older clients though? What if some client expects
ButtonPress/Release to be basically boolean pointer down/up events and
takes the coords from MotionNotify?
More information about the xorg-devel
mailing list