[PATCH libinput v3 5/5] libinput: add orientation and size of touch point and pressure to the API

Andreas Pokorny andreas.pokorny at canonical.com
Fri Jul 3 06:50:58 PDT 2015


Hi,

On Thu, Jun 25, 2015 at 8:03 AM, Peter Hutterer <peter.hutterer at who-t.net>
wrote:

> [...]
> > -             break;
> > -     case ABS_MT_TRACKING_ID:
> > +     } else if(e->code == ABS_MT_TRACKING_ID) {
> >               if (device->pending_event != EVDEV_NONE &&
> >                   device->pending_event != EVDEV_ABSOLUTE_MT_MOTION)
> >                       evdev_flush_pending_event(device, time);
> > -             if (e->value >= 0)
> > +             if (e->value >= 0) {
> >                       device->pending_event = EVDEV_ABSOLUTE_MT_DOWN;
> > -             else
> > +                     current_slot->available_data =
> TOUCH_SLOT_DATA_NONE;
> > +                     current_slot->pressure = DEFAULT_TOUCH_PRESSURE;
> > +                     current_slot->orientation =
> DEFAULT_TOUCH_ORIENTATION;
> > +                     current_slot->touch_major = DEFAULT_TOUCH_MAJOR;
> > +                     current_slot->touch_minor = DEFAULT_TOUCH_MINOR;
>
> no, get this from libevdev, otherwise we may have the wrong value if the
> kernel skips it when the value is unchanged to the last event. that's
> unlikely enough, but one of the bugs that's painful to debug when it does
> happen. see  libevdev_get_slot_value().
>

But libevdev should not have values in this case. This branch happens when
a touch trackin id is removed.
So after the finger was lifted.

I agree with all the other findings. It was a busy week. I guess I can
finish this over the weekend.
I also settled with the idea of using zero as indicator that there is no
value available, which works well
with pressure and touch ellipse size, and does not matter for orientation

regards
Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20150703/77b74be2/attachment.html>


More information about the wayland-devel mailing list