fix, cursor (hotx,hoty) mismatch sometimes

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2023-10-03 21:16:12 +08:00
parent 03c0111017
commit 8b807d7b50
2 changed files with 46 additions and 29 deletions

View File

@@ -614,7 +614,7 @@ class _ImagePaintState extends State<ImagePaint> {
} else {
final key = cache.updateGetKey(scale);
if (!cursor.cachedKeys.contains(key)) {
debugPrint("Register custom cursor with key $key");
debugPrint("Register custom cursor with key $key (${cache.hotx},${cache.hoty})");
// [Safety]
// It's ok to call async registerCursor in current synchronous context,
// because activating the cursor is also an async call and will always