From f12e2f16dc879fac12342eea2344e974073faafa Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sat, 18 Apr 2020 11:25:24 -0700 Subject: [PATCH] Add handling for cancelled touch events --- Limelight/Input/StreamView.m | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Limelight/Input/StreamView.m b/Limelight/Input/StreamView.m index ebd7005..2cf26d4 100644 --- a/Limelight/Input/StreamView.m +++ b/Limelight/Input/StreamView.m @@ -332,6 +332,12 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5; } - (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event { + [dragTimer invalidate]; + dragTimer = nil; + if (isDragging) { + isDragging = false; + LiSendMouseButtonEvent(BUTTON_ACTION_RELEASE, BUTTON_LEFT); + } } #if TARGET_OS_TV