From 116acc8d25bc8c20efd88ace43baceaf20c66c20 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Sat, 28 Aug 2021 13:56:39 +0200 Subject: [PATCH] Use SOURCE_MOUSE for scroll events This has no practical impact (AFAIK), but a scroll events should come from a mouse. Refs #2602 --- 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 92986241..45882bb9 100644 --- a/server/src/main/java/com/genymobile/scrcpy/Controller.java +++ b/server/src/main/java/com/genymobile/scrcpy/Controller.java @@ -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); }