[PATCH 3/3] evdev: Don't post REL_MISC events as axis motion. (#24737)

Peter Hutterer peter.hutterer at who-t.net
Thu Aug 12 23:25:02 PDT 2010


On Tue, Aug 10, 2010 at 10:32:08PM +0200, Bartosz Brachaczek wrote:
> Some devices, notably A4Tech X-750F, send unknown events with non-zero
> value after almost every other event which kernel interprets as REL_MISC.
> It results in a motion event sent between all key press/release events,
> which is incorrect and may unnecessarily trigger drag'n'drop actions.
> 
> X.Org Bug 24737 <http://bugs.freedesktop.org/show_bug.cgi?id=24737>
> 
> Signed-off-by: Bartosz Brachaczek <b.brachaczek at gmail.com>
> Tested-by: Bartek Iwaniec <hash87 at gmail.com>
> ---
>  src/evdev.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/src/evdev.c b/src/evdev.c
> index 31fe1d6..ca9dc6f 100644
> --- a/src/evdev.c
> +++ b/src/evdev.c
> @@ -500,7 +500,10 @@ EvdevProcessRelativeMotionEvent(InputInfoPtr
> pInfo, struct input_event *ev)
>                  EvdevQueueButtonClicks(pInfo, wheel_left_button, -value);
>              break;
> 
> -        /* We don't post wheel events as axis motion. */
> +        case REL_MISC:
> +            break;
> +
> +        /* We don't post wheel/misc events as axis motion. */
>          default:
>              /* Ignore EV_REL events if we never set up for them. */
>              if (!(pEvdev->flags & EVDEV_RELATIVE_EVENTS))
> -- 
> 1.7.2

Can you provide the evtest or evtest-capture output for such a device?
REL_MISC should just be handled as another axis and if it's non-zero, it
should not affect x/y motion.

I merged the other two, will push after a bit of testing.

Cheers,
  Peter


More information about the xorg-devel mailing list