[PATCH libinput] libinput: litest shall only emit auto assign events when replaced
Peter Hutterer
peter.hutterer at who-t.net
Thu Aug 20 19:57:21 PDT 2015
On Thu, Aug 20, 2015 at 01:43:40PM +0200, Andreas Pokorny wrote:
> With this change auto assign events will be skipped if no replacement value
> is provided. This behavior is practical when emitting mt events, as those
> only contain the axis values that changed.
>
> Signed-off-by: Andreas Pokorny <andreas.pokorny at canonical.com>
> ---
merged locally, thanks. Note that I'll keep this commit until after the 1.0
release and push it to master then.
Cheers,
Peter
> test/litest.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/test/litest.c b/test/litest.c
> index 26c5e43..8fc7bca 100644
> --- a/test/litest.c
> +++ b/test/litest.c
> @@ -1292,7 +1292,6 @@ litest_auto_assign_value(struct litest_device *d,
> value = touching ? 0 : 1;
> break;
> default:
> - value = -1;
> if (!axis_replacement_value(axes, ev->code, &value) &&
> d->interface->get_axis_default)
> d->interface->get_axis_default(d, ev->code, &value);
> @@ -1342,8 +1341,8 @@ litest_slot_start(struct litest_device *d,
> y,
> axes,
> touching);
> -
> - litest_event(d, ev->type, ev->code, value);
> + if (value != LITEST_AUTO_ASSIGN)
> + litest_event(d, ev->type, ev->code, value);
> ev++;
> }
> }
> @@ -1428,7 +1427,8 @@ litest_slot_move(struct litest_device *d,
> y,
> axes,
> touching);
> - litest_event(d, ev->type, ev->code, value);
> + if (value != LITEST_AUTO_ASSIGN)
> + litest_event(d, ev->type, ev->code, value);
> ev++;
> }
> }
> --
> 2.1.4
>
More information about the wayland-devel
mailing list