From e2d5f0e7fc98af97f3785ce492b7e8f87b109df1 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Thu, 7 May 2020 15:08:11 +0200 Subject: [PATCH] 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 --- server/src/main/java/com/genymobile/scrcpy/Controller.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/main/java/com/genymobile/scrcpy/Controller.java b/server/src/main/java/com/genymobile/scrcpy/Controller.java index 32a18e16..eb5a0805 100644 --- a/server/src/main/java/com/genymobile/scrcpy/Controller.java +++ b/server/src/main/java/com/genymobile/scrcpy/Controller.java @@ -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); }