[PATCH] evdev: pass the valuators to the X server for ButtonPress/Release events.

Peter Hutterer peter.hutterer at who-t.net
Thu Feb 25 16:48:07 PST 2010


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.

I'd prefer a change that skips the xf86PostMotionEvent so that we just send
the button event with the new coordinates.
 
Cheers,
  Peter


More information about the xorg-devel mailing list