diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-07-17 12:24:14 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-07-17 12:24:14 +0200 |
commit | a4312eebaaa8858922d178dd87616fa07008127b (patch) | |
tree | a6beb6816c4890ad6f61270417307246aa1777a4 /platform/android/java/lib | |
parent | a963f111cb282a6fec1903c9cf388cb898776c05 (diff) | |
parent | 53a752f2d62c97ca020741db23ee1ed9f9b7760b (diff) | |
download | redot-engine-a4312eebaaa8858922d178dd87616fa07008127b.tar.gz |
Merge pull request #94468 from m4gr3d/restart_editor_when_updating_touchscreen_settings
[Android Editor] Resolve issues with the editor touchscreen settings
Diffstat (limited to 'platform/android/java/lib')
-rw-r--r-- | platform/android/java/lib/src/org/godotengine/godot/input/GodotGestureHandler.kt | 5 | ||||
-rw-r--r-- | platform/android/java/lib/src/org/godotengine/godot/input/GodotInputHandler.java | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/platform/android/java/lib/src/org/godotengine/godot/input/GodotGestureHandler.kt b/platform/android/java/lib/src/org/godotengine/godot/input/GodotGestureHandler.kt index 4cd3bd8db9..2929a0a0b0 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/input/GodotGestureHandler.kt +++ b/platform/android/java/lib/src/org/godotengine/godot/input/GodotGestureHandler.kt @@ -76,7 +76,10 @@ internal class GodotGestureHandler(private val inputHandler: GodotInputHandler) } override fun onLongPress(event: MotionEvent) { - contextClickRouter(event) + val toolType = GodotInputHandler.getEventToolType(event) + if (toolType != MotionEvent.TOOL_TYPE_MOUSE) { + contextClickRouter(event) + } } private fun contextClickRouter(event: MotionEvent) { diff --git a/platform/android/java/lib/src/org/godotengine/godot/input/GodotInputHandler.java b/platform/android/java/lib/src/org/godotengine/godot/input/GodotInputHandler.java index afe570dcc6..273774a33d 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/input/GodotInputHandler.java +++ b/platform/android/java/lib/src/org/godotengine/godot/input/GodotInputHandler.java @@ -462,7 +462,7 @@ public class GodotInputHandler implements InputManager.InputDeviceListener { return button; } - private static int getEventToolType(MotionEvent event) { + static int getEventToolType(MotionEvent event) { return event.getPointerCount() > 0 ? event.getToolType(0) : MotionEvent.TOOL_TYPE_UNKNOWN; } |