mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-25 22:13:04 +00:00
Ignore relative mouse inputs from non-mouse tools
Apparently this can happen for the SPen on Android 12
This commit is contained in:
parent
f39bf61b04
commit
c0f8001627
@ -96,7 +96,7 @@ public class AndroidNativePointerCaptureProvider extends AndroidPointerIconCaptu
|
||||
// SOURCE_TOUCHPAD will have relative axes populated iff our view has pointer capture.
|
||||
// See https://developer.android.com/reference/android/view/View#requestPointerCapture()
|
||||
int eventSource = event.getSource();
|
||||
return eventSource == InputDevice.SOURCE_MOUSE_RELATIVE ||
|
||||
return (eventSource == InputDevice.SOURCE_MOUSE_RELATIVE && event.getToolType(0) == MotionEvent.TOOL_TYPE_MOUSE) ||
|
||||
(eventSource == InputDevice.SOURCE_TOUCHPAD && targetView.hasPointerCapture());
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user