From 8583b6b140183f02644b853b8243e17e19c7328e Mon Sep 17 00:00:00 2001 From: open-trade Date: Wed, 25 Nov 2020 21:15:06 +0800 Subject: [PATCH] long press for drag --- flutter_hbb/lib/remote_page.dart | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/flutter_hbb/lib/remote_page.dart b/flutter_hbb/lib/remote_page.dart index 8b5fcbbea..8998d6db2 100644 --- a/flutter_hbb/lib/remote_page.dart +++ b/flutter_hbb/lib/remote_page.dart @@ -178,6 +178,17 @@ class _RemotePageState extends State { if (_drag || _scroll) return; FFI.tap(_right); }, + onLongPressStart: (_) { + if (_drag) { + // case: to show password on windows + FFI.sendMouse('down', 'left'); + } + }, + onLongPressEnd: (_) { + if (_drag) { + FFI.sendMouse('up', 'left'); + } + }, onScaleStart: (details) { _scale = 1; _xOffset = details.focalPoint.dx;