mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-05-11 10:26:19 +02:00
fix: android, pan, canvas, remove toInt()
(#10103)
Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
parent
b91b49229a
commit
b32ff87c6e
2 changed files with 23 additions and 27 deletions
|
@ -2184,7 +2184,7 @@ class CursorModel with ChangeNotifier {
|
|||
|
||||
if (dx == 0 && dy == 0) return;
|
||||
|
||||
Point? newPos;
|
||||
Point<double>? newPos;
|
||||
final rect = parent.target?.ffiModel.rect;
|
||||
if (rect == null) {
|
||||
// unreachable
|
||||
|
@ -2195,8 +2195,8 @@ class CursorModel with ChangeNotifier {
|
|||
parent.target?.ffiModel.pi.platform,
|
||||
kPointerEventKindMouse,
|
||||
kMouseEventTypeDefault,
|
||||
(_x + dx).toInt(),
|
||||
(_y + dy).toInt(),
|
||||
_x + dx,
|
||||
_y + dy,
|
||||
rect,
|
||||
buttons: kPrimaryButton);
|
||||
if (newPos == null) {
|
||||
|
@ -2204,8 +2204,8 @@ class CursorModel with ChangeNotifier {
|
|||
}
|
||||
dx = newPos.x - _x;
|
||||
dy = newPos.y - _y;
|
||||
_x = newPos.x.toDouble();
|
||||
_y = newPos.y.toDouble();
|
||||
_x = newPos.x;
|
||||
_y = newPos.y;
|
||||
if (tryMoveCanvasX && dx != 0) {
|
||||
parent.target?.canvasModel.panX(-dx * scale);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue