From 175074ece8bb4292d6ca679d3b4e1356c4ee7492 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 8 May 2016 15:09:43 -0400 Subject: [PATCH] Tweaks to dragging behavior to match Moonlight Android --- Limelight/Input/StreamView.m | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Limelight/Input/StreamView.m b/Limelight/Input/StreamView.m index 70c425e..bd4afa2 100644 --- a/Limelight/Input/StreamView.m +++ b/Limelight/Input/StreamView.m @@ -53,7 +53,7 @@ touchLocation = [touch locationInView:self]; touchMoved = false; if ([[event allTouches] count] == 1 && !isDragging) { - dragTimer = [NSTimer scheduledTimerWithTimeInterval:1.0 + dragTimer = [NSTimer scheduledTimerWithTimeInterval:0.650 target:self selector:@selector(onDragStart:) userInfo:nil @@ -122,8 +122,6 @@ usleep(100 * 1000); LiSendMouseButtonEvent(BUTTON_ACTION_RELEASE, BUTTON_RIGHT); - - } else { if (!isDragging){ Log(LOG_D, @"Sending left mouse button press"); @@ -137,6 +135,10 @@ LiSendMouseButtonEvent(BUTTON_ACTION_RELEASE, BUTTON_LEFT); } } + else if (isDragging) { + isDragging = false; + LiSendMouseButtonEvent(BUTTON_ACTION_RELEASE, BUTTON_LEFT); + } } }