From 6c720bf3f1bbf33af774ef790158e57a2675cf43 Mon Sep 17 00:00:00 2001 From: attila Date: Thu, 12 Jan 2023 19:08:11 +0100 Subject: [PATCH] Android: Add simulated mouse exit event to the mouse up callback Without this event Components such as Button would remain in a hover state indefinitely after being clicked on a touch screen. The simulated event matches the behaviour of the other platforms. --- .../juce_gui_basics/native/juce_android_Windowing.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/juce_gui_basics/native/juce_android_Windowing.cpp b/modules/juce_gui_basics/native/juce_android_Windowing.cpp index 1fadc42a53..b5edc55a02 100644 --- a/modules/juce_gui_basics/native/juce_android_Windowing.cpp +++ b/modules/juce_gui_basics/native/juce_android_Windowing.cpp @@ -1489,6 +1489,15 @@ public: time, {}, index); + + handleMouseEvent (MouseInputSource::InputSourceType::touch, + MouseInputSource::offscreenMousePos, + ModifierKeys::currentModifiers.withoutMouseButtons(), + MouseInputSource::defaultPressure, + MouseInputSource::defaultOrientation, + time, + {}, + index); } void handleAccessibilityHoverCallback (int command, Point sysPos, int64)