gujjwal00 / avnc

VNC Client for Android
GNU General Public License v3.0
600 stars 57 forks source link

Enhancement: Ignore long press when no actions are set #243

Closed RadarNyan closed 1 month ago

RadarNyan commented 1 month ago

I personally don't use the long press action, so I have it set to none. But I'm having problems with the mouse cursor stuck in place because a long press was detected (I can feel a haptic feedback for that). I'd like to have the touchscreen continue to work as a touchpad and ignore the long press altogether.

I have a working patch, but the code quality really isn't good enough for a pull request.

gujjwal00 commented 1 month ago

Fixed in https://github.com/gujjwal00/avnc/commit/86330f2a8a998861297644a8cbd08225efb22b78 . Thanks @RadarNyan

RadarNyan commented 1 month ago

@gujjwal00 If memory serves me correctly, modifying this code will get rid of the haptic feedback, but would not allow the touchscreen to continue working after a long press is detected, which results in being unable to move the cursor if putting a finger on the screen for too long (that registers as a long press), which is not consistent with the behavior of touchpads on laptops.

This is why I went as far as modifying GestureDetectorEx.

gujjwal00 commented 1 month ago

Oh, I thought it was just the vibration that was bothering you. In that case, I have applied your patch with a slight modification to move the test to AppPreferences. Thanks again.