From ef0980a9b1535e02cfbf1c9774d49b1e0fc0275c Mon Sep 17 00:00:00 2001 From: fufesou Date: Thu, 8 Sep 2022 21:05:26 -0700 Subject: [PATCH] flutter_desktop: fix local cursor (hotx,hoty) offset Signed-off-by: fufesou --- flutter/lib/desktop/pages/remote_page.dart | 4 ++-- flutter/lib/models/model.dart | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/flutter/lib/desktop/pages/remote_page.dart b/flutter/lib/desktop/pages/remote_page.dart index 96ade40f4..3d47dd1ce 100644 --- a/flutter/lib/desktop/pages/remote_page.dart +++ b/flutter/lib/desktop/pages/remote_page.dart @@ -599,8 +599,8 @@ class ImagePaint extends StatelessWidget { return FlutterCustomMemoryImageCursor( pixbuf: cacheLinux.data, key: key, - hotx: cacheLinux.hotx, - hoty: cacheLinux.hoty, + hotx: 0.0, + hoty: 0.0, imageWidth: (cacheLinux.width * scale).toInt(), imageHeight: (cacheLinux.height * scale).toInt(), ); diff --git a/flutter/lib/models/model.dart b/flutter/lib/models/model.dart index e907f3ded..6d8d68281 100644 --- a/flutter/lib/models/model.dart +++ b/flutter/lib/models/model.dart @@ -619,7 +619,7 @@ class CursorData { int _doubleToInt(double v) => (v * 10e6).round().toInt(); String key(double scale) => - '${peerId}_${id}_${_doubleToInt(hotx)}_${_doubleToInt(hoty)}_${_doubleToInt(width * scale)}_${_doubleToInt(height * scale)}'; + '${peerId}_${id}_${_doubleToInt(width * scale)}_${_doubleToInt(height * scale)}'; } class CursorModel with ChangeNotifier {