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 <[email protected]> --- 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 _______________________________________________ wayland-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/wayland-devel
