[PATCH libinput] evdev: don't post a relative motion event for dx/dy 0/0
Peter Hutterer
peter.hutterer at who-t.net
Sun May 25 23:36:52 PDT 2014
On Mon, May 26, 2014 at 08:27:54AM +0200, Jonas Ådahl wrote:
> On Mon, May 26, 2014 at 03:41:33PM +1000, Peter Hutterer wrote:
> > Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> > ---
> > src/evdev.c | 10 ++++++----
> > 1 file changed, 6 insertions(+), 4 deletions(-)
> >
> > diff --git a/src/evdev.c b/src/evdev.c
> > index fedc324..6aa0d46 100644
> > --- a/src/evdev.c
> > +++ b/src/evdev.c
> > @@ -134,10 +134,12 @@ evdev_flush_pending_event(struct evdev_device *device, uint32_t time)
> > /* Apply pointer acceleration. */
> > filter_dispatch(device->pointer.filter, &motion, device, time);
> >
> > - pointer_notify_motion(base,
> > - time,
> > - li_fixed_from_double(motion.dx),
> > - li_fixed_from_double(motion.dy));
> > + x = li_fixed_from_double(motion.dx);
> > + y = li_fixed_from_double(motion.dy);
> > +
> > + if (x != 0 || y != 0)
> > + pointer_notify_motion(base, time, x, y);
> > +
>
> Yes, I have fixed and squashed this locally already when looking into
> the test failure. I will just send an updated version with the updated
> test if thats alright with you.
sure, that's fine.
Cheers,
Peter
>
> > device->rel.dx = 0;
> > device->rel.dy = 0;
> > break;
> > --
> > 1.9.3
> >
More information about the wayland-devel
mailing list