On 3/07/2015 23:50 , Andreas Pokorny wrote:
Hi,

On Thu, Jun 25, 2015 at 8:03 AM, Peter Hutterer <peter.hutte...@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.

libevdev still keeps the values, it doesn't reset them. and whether a slot is active or not doesn't matter, it doesn't track touches. so as long as the slot number is valid, the value to query is valid.

Cheers,
  Peter

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


_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to