[PATCH libinput] Fix premature flushing of evdev event on mx4 touchscreen

Andreas Pokorny andreas.pokorny at canonical.com
Mon Sep 7 00:58:17 PDT 2015


Hi,


On Mon, Sep 7, 2015 at 3:51 AM, Peter Hutterer <peter.hutterer at who-t.net>
wrote:

> [...]
> > +             { {0}, EV_KEY, BTN_TOUCH, 0},
> > +             { {0}, EV_KEY, BTN_TOOL_FINGER, 0},
> > +             { {0}, EV_SYN, SYN_REPORT, 0}
> > +     };
>
> I'm wondering - wouldn't it be worth to add this device as a separate
> litest
> device and add the BTN_TOOL_FINGER in the down events for that device?
> hand-crafted devices and event sequences should be for custom devices and
> quirky sequences, this one appears to be pretty stock-standard and thus we
> expect everything else to work fine as well.
>
> plus, I suspect if you add this as a normal test device, the other tests
> will fail so you may not even need a  separate test.
>

Yes I did that and ran into more problems, but not with libinput but the
tests itself. Becuase the device has a high resolution some of the test
fail due to a lack of accuracy.  The test framework expects the tests to
send values within the range [0, 100]. Litest scales that up to the device
range. So each reported device value gets scaled to 11 or 19 device pixel
for horizontal or vertincal axis. So it gets slightly harder to hit the
-0.5 +0.5 error bar multiplied by the calibration value in
touch_calibration_translation.I fiddled with that some time, but felt the
only way to compensate that might be reading the device axis and applying
the same calculation that happens in litest & libinput.

So I decided to first ship this test & fix, and then add all the other
devices I have here for testing later.  And thus the improvements to the
tests, whatever those might be.


> > +     const int num_events = sizeof input_sequence / sizeof
> input_sequence[0];
>
> ARRAY_LENGTH
> [...]
> >       litest_add_ranged("touch:state", touch_initial_state,
> LITEST_TOUCH, LITEST_PROTOCOL_A, &axes);
> >
> >       litest_add("touch:time", touch_time_usec, LITEST_TOUCH,
> LITEST_TOUCHPAD);
> > +
> > +     litest_add_no_device("touch:filter EV_KEY BTN_TOOL_FINGER",
> touchscreen_with_btn_tool_finger_on_down);
>
> the string in the test is a suite name (comes from the check framework) and
> serves to limit tests to a category of tests. e.g. you can run the
> "touch:calibration" suite to check all calibration tests.
> it's not to label a specific test, that's what the function name is for.
> Please come up with something more generic, "touch:special events" or so
> maybe.
>

Ok will fix the rest

regards,
Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20150907/8dee5d4f/attachment.html>


More information about the wayland-devel mailing list