From 863c8de28ee9a02626403a4a2fd61ea1c6dfa1bf Mon Sep 17 00:00:00 2001 From: fufesou Date: Mon, 2 Oct 2023 10:15:20 +0800 Subject: [PATCH] fix, one tap results double tap event Signed-off-by: fufesou --- flutter/lib/common/widgets/remote_input.dart | 4 +++- flutter/lib/mobile/pages/remote_page.dart | 5 ++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/flutter/lib/common/widgets/remote_input.dart b/flutter/lib/common/widgets/remote_input.dart index b00cd1fb4..e2bb86e43 100644 --- a/flutter/lib/common/widgets/remote_input.dart +++ b/flutter/lib/common/widgets/remote_input.dart @@ -112,7 +112,9 @@ class _RawTouchGestureDetectorRegionState if (lastDeviceKind != PointerDeviceKind.touch) { return; } - inputModel.tap(MouseButtons.left); + if (!handleTouch) { + inputModel.tap(MouseButtons.left); + } } onDoubleTapDown(TapDownDetails d) { diff --git a/flutter/lib/mobile/pages/remote_page.dart b/flutter/lib/mobile/pages/remote_page.dart index f638fb2e8..f5b6270f9 100644 --- a/flutter/lib/mobile/pages/remote_page.dart +++ b/flutter/lib/mobile/pages/remote_page.dart @@ -421,9 +421,8 @@ class _RemotePageState extends State { ); } - // to-do: Check if peer is ios. - bool get isPeerMobile => kPeerPlatformAndroid == gFFI.ffiModel.pi.platform; - bool get showCursorPaint => !isPeerMobile && !gFFI.canvasModel.cursorEmbedded; + bool get showCursorPaint => + !gFFI.ffiModel.isPeerAndroid && !gFFI.canvasModel.cursorEmbedded; Widget getBodyForMobile() { final keyboardIsVisible = keyboardVisibilityController.isVisible;