mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-12 19:17:58 +00:00
fix cursor (hotx,hoty) && add default remote cursor image
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
@@ -862,11 +862,19 @@ class CursorPaint extends StatelessWidget {
|
||||
final c = Provider.of<CanvasModel>(context);
|
||||
final adjust = gFFI.cursorModel.adjustForKeyboard();
|
||||
var s = c.scale;
|
||||
double hotx = m.hotx;
|
||||
double hoty = m.hoty;
|
||||
if (m.image == null) {
|
||||
if (m.defaultCache != null) {
|
||||
hotx = m.defaultCache!.hotx;
|
||||
hoty = m.defaultCache!.hoty;
|
||||
}
|
||||
}
|
||||
return CustomPaint(
|
||||
painter: ImagePainter(
|
||||
image: m.image,
|
||||
x: m.x * s - m.hotx + c.x,
|
||||
y: m.y * s - m.hoty + c.y - adjust,
|
||||
image: m.image ?? m.defaultImage,
|
||||
x: m.x * s - hotx + c.x,
|
||||
y: m.y * s - hoty + c.y - adjust,
|
||||
scale: 1),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user