[PATCH libinput 1/3] test: skip manually setting uinput resolution if it's already set
Hans de Goede
hdegoede at redhat.com
Thu May 19 12:38:59 UTC 2016
Hi,
On 19-05-16 01:05, Peter Hutterer wrote:
> On Wed, May 18, 2016 at 10:48:45AM +0200, Hans de Goede wrote:
>> Hi,
>>
>> On 18-05-16 09:02, Peter Hutterer wrote:
>>> If we have libevdev 1.5 or later, the resolution is already set, no need to
>>> change it again. Let's rely on libevdev to do the right thing and simply skip
>>> the rest if we have one nonzero resolution already set on the device.
>>>
>>> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
>>
>> The commit msg does not match the patch, you're not checking for a non 0 value,
>> but for == abs->resolution.
>
> changed to "... one *correct* nonzero resolution..."
> thanks
With that change:
Reviewed-by: Hans de Goede <hdegoede at redhat.com>
Regards,
Hans
>
> Cheers,
> Peter
>
>>
>>> ---
>>> test/litest.c | 4 ++++
>>> 1 file changed, 4 insertions(+)
>>>
>>> diff --git a/test/litest.c b/test/litest.c
>>> index 7f5a4d7..66f08f2 100644
>>> --- a/test/litest.c
>>> +++ b/test/litest.c
>>> @@ -2293,6 +2293,10 @@ litest_create_uinput(const char *name,
>>> abs = abs_info;
>>> while (abs && abs->value != -1) {
>>> if (abs->resolution != 0) {
>>> + if (libevdev_get_abs_resolution(dev, abs->value) ==
>>> + abs->resolution)
>>> + break;
>>> +
>>> rc = libevdev_kernel_set_abs_info(dev,
>>> abs->value,
>>> abs);
>>>
More information about the wayland-devel
mailing list