Use SOURCE_MOUSE for scroll events

This might explain why scroll events are sometimes not handled properly.

Refs <https://stackoverflow.com/questions/68954790/why-is-lazycolumn-not-scrollable-using-mouse-but-recycler-view-is>
This commit is contained in:
Romain Vimont
2021-08-28 13:56:39 +02:00
parent c96f5c70e9
commit 13b8fc0ad9

View File

@@ -241,7 +241,7 @@ public class Controller {
MotionEvent event = MotionEvent
.obtain(lastTouchDown, now, MotionEvent.ACTION_SCROLL, 1, pointerProperties, pointerCoords, 0, 0, 1f, 1f, DEFAULT_DEVICE_ID, 0,
InputDevice.SOURCE_TOUCHSCREEN, 0);
InputDevice.SOURCE_MOUSE, 0);
return device.injectEvent(event);
}