mirror of
https://github.com/Genymobile/scrcpy
synced 2024-11-15 06:12:53 +00:00
Send scroll events as a touchscreen
Scroll events were sent with a mouse input device. When scrolling on a list, this could cause the whole list to be focused, and drawn with the focus color as background. Send scroll events with a touchscreen input device instead (like motion events). Fixes #1362 <https://github.com/Genymobile/scrcpy/issues/1362>
This commit is contained in:
parent
ead7ee4a03
commit
e2d5f0e7fc
@ -215,7 +215,7 @@ public class Controller {
|
||||
|
||||
MotionEvent event = MotionEvent
|
||||
.obtain(lastTouchDown, now, MotionEvent.ACTION_SCROLL, 1, pointerProperties, pointerCoords, 0, 0, 1f, 1f, DEVICE_ID_VIRTUAL, 0,
|
||||
InputDevice.SOURCE_MOUSE, 0);
|
||||
InputDevice.SOURCE_TOUCHSCREEN, 0);
|
||||
return injectEvent(event);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user