Fix delayed-click implementation
- Insert delay only for left-click - Ignore thread interruption during sleep
This commit is contained in:
parent
3e0c2e9808
commit
bb81bec87b
2 changed files with 2 additions and 2 deletions
|
|
@ -190,7 +190,7 @@ class Dispatcher(private val activity: VncActivity) {
|
|||
fun doClick(button: PointerButton, p: PointF) {
|
||||
doButtonDown(button, p)
|
||||
// Some (obscure) apps seems to ignore click event if button-up is received too early
|
||||
if (profile.cfButtonUpDelay)
|
||||
if (button == PointerButton.Left && profile.cfButtonUpDelay)
|
||||
messenger.insertButtonUpDelay()
|
||||
doButtonUp(button, p)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ class Messenger(private val client: VncClient) {
|
|||
}
|
||||
|
||||
fun insertButtonUpDelay() {
|
||||
execute { Thread.sleep(200) }
|
||||
execute { runCatching { Thread.sleep(200) } }
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue