mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-09-18 18:31:02 +03:00
Fix native cursor display selection during local movement
This commit is contained in:
@@ -449,6 +449,8 @@ class InputModel {
|
||||
final isPhysicalMouse = false.obs;
|
||||
int _lastButtons = 0;
|
||||
Offset lastMousePos = Offset.zero;
|
||||
// Host position echoes may be absent; keep locally mapped input separately.
|
||||
final remotePointerPosition = Rxn<Offset>();
|
||||
int _lastWheelTsUs = 0;
|
||||
|
||||
// Wheel acceleration thresholds.
|
||||
@@ -1954,7 +1956,7 @@ class InputModel {
|
||||
canvasModel.updateLocalCursor(x, y);
|
||||
}
|
||||
|
||||
return _handlePointerDevicePos(
|
||||
final point = _handlePointerDevicePos(
|
||||
kind,
|
||||
x,
|
||||
y,
|
||||
@@ -1965,6 +1967,20 @@ class InputModel {
|
||||
onExit: onExit,
|
||||
buttons: buttons,
|
||||
);
|
||||
_rememberRemotePointer(point, isMove);
|
||||
return point;
|
||||
}
|
||||
|
||||
void _rememberRemotePointer(Point? point, bool isMove) {
|
||||
final peer = parent.target!.ffiModel;
|
||||
if (point == null ||
|
||||
!isMove ||
|
||||
!(isDesktop || isWebDesktop) ||
|
||||
peer.pi.currentDisplay != kAllDisplayValue ||
|
||||
!peer.isPeerLinux) {
|
||||
return;
|
||||
}
|
||||
remotePointerPosition.value = Offset(point.x.toDouble(), point.y.toDouble());
|
||||
}
|
||||
|
||||
bool _isInCurrentWindow(double x, double y) {
|
||||
|
||||
Reference in New Issue
Block a user