flutter_desktop: debug win cursor

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2022-10-30 13:50:44 +08:00
parent 9591c908a1
commit 2c34112492
3 changed files with 31 additions and 25 deletions

View File

@@ -340,12 +340,14 @@ class ImagePaint extends StatelessWidget {
return MouseCursor.defer;
} else {
final key = cacheLinux.updateGetKey(scale);
cursor.addKeyLinux(key);
cursor.addKey(key);
return FlutterCustomMemoryImageCursor(
pixbuf: cacheLinux.data,
key: key,
hotx: cacheLinux.hotx,
hoty: cacheLinux.hoty,
// hotx: cacheLinux.hotx,
// hoty: cacheLinux.hoty,
hotx: 0,
hoty: 0,
imageWidth: (cacheLinux.width * cacheLinux.scale).toInt(),
imageHeight: (cacheLinux.height * cacheLinux.scale).toInt(),
);
@@ -362,7 +364,7 @@ class ImagePaint extends StatelessWidget {
cursor.updateForbiddenCursorBuffer();
}
final key = 'disabled_cursor_key';
cursor.addKeyLinux(key);
cursor.addKey(key);
return FlutterCustomMemoryImageCursor(
pixbuf: cursor.cachedForbidmemoryCursorData,
key: key,