* events it means the tablet will give us the right
* events after all and we can disable our
* timer-based proximity out.
+ *
+ * We can't do so permanently though, some tablets
+ * send the correct event sequence occasionally but
+ * are broken otherwise.
*/
- if (!tablet->quirks.proximity_out_in_progress)
- tablet->quirks.need_to_force_prox_out = false;
-
libinput_timer_cancel(&tablet->quirks.prox_out_timer);
}
}
evdev_log_debug(tablet->device, "tablet: forcing proximity after timeout\n");
- tablet->quirks.proximity_out_in_progress = true;
ARRAY_FOR_EACH(events, e) {
tablet->base.interface->process(&tablet->base,
tablet->device,
e,
now);
}
- tablet->quirks.proximity_out_in_progress = false;
tablet->quirks.proximity_out_forced = true;
}
return;
tablet_update_tool(tablet, device, tool, state);
- if (tablet->quirks.need_to_force_prox_out)
- tablet_proximity_out_quirk_set_timer(tablet, libinput_now(li));
+ tablet_proximity_out_quirk_set_timer(tablet, libinput_now(li));
tablet->current_tool.id =
libevdev_get_event_value(device->evdev,
tablet_set_status(tablet, TABLET_TOOL_OUT_OF_PROXIMITY);
- /* We always enable the proximity out quirk, but disable it once a
- device gives us the right event sequence */
- tablet->quirks.need_to_force_prox_out = true;
-
libinput_timer_init(&tablet->quirks.prox_out_timer,
tablet_libinput_context(tablet),
"proxout",
x = 20;
y = 45;
- /* disable prox-out timer quirk */
- litest_tablet_proximity_in(dev, x, y - 1, axes);
- litest_tablet_proximity_out(dev);
-
litest_tablet_proximity_in(dev, x, y - 1, axes);
litest_drain_events(li);
litest_touch_sequence(finger, 0, x - 10, y + 2, x - 10, y + 20, 3);
libinput_dispatch(li);
litest_assert_touch_sequence(li);
+ /* tablet event so we don't time out for proximity */
+ litest_tablet_motion(dev, x, y - 0.1, axes);
+ litest_drain_events(li);
/* above rect */
litest_touch_sequence(finger, 0, x + 2, y - 35, x + 20, y - 10, 3);
libinput_dispatch(li);
litest_assert_touch_sequence(li);
+ /* tablet event so we don't time out for proximity */
+ litest_tablet_motion(dev, x, y + 0.1, axes);
+ litest_drain_events(li);
/* right of rect */
litest_touch_sequence(finger, 0, x + 80, y + 2, x + 20, y + 10, 3);
libinput_dispatch(li);
litest_assert_touch_sequence(li);
+ /* tablet event so we don't time out for proximity */
+ litest_tablet_motion(dev, x, y - 0.1, axes);
+ litest_drain_events(li);
#if 0
/* This *should* work but the Cintiq test devices is <200mm
is_touchpad = !libevdev_has_property(finger->evdev, INPUT_PROP_DIRECT);
- /* disable prox-out timer quirk */
- litest_tablet_proximity_in(dev, 30, 30, axes);
- litest_tablet_proximity_out(dev);
- litest_drain_events(li);
-
litest_touch_down(finger, 0, 30, 30);
litest_touch_move_to(finger, 0, 30, 30, 80, 80, 10);