fix: multi-window, click-move (#7844)

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2024-04-27 13:45:44 +08:00
committed by GitHub
parent b863ea51ad
commit a6632632fa
7 changed files with 481 additions and 134 deletions

View File

@@ -203,7 +203,7 @@ class _RawTouchGestureDetectorRegionState
return;
}
if (!handleTouch) {
ffi.cursorModel.updatePan(d.delta.dx, d.delta.dy, handleTouch);
ffi.cursorModel.updatePan(d.delta, d.localPosition, handleTouch);
}
}
@@ -222,6 +222,9 @@ class _RawTouchGestureDetectorRegionState
return;
}
if (handleTouch) {
if (isDesktop) {
ffi.cursorModel.trySetRemoteWindowCoords();
}
inputModel.sendMouse('down', MouseButtons.left);
ffi.cursorModel.move(d.localPosition.dx, d.localPosition.dy);
} else {
@@ -241,13 +244,16 @@ class _RawTouchGestureDetectorRegionState
if (lastDeviceKind != PointerDeviceKind.touch) {
return;
}
ffi.cursorModel.updatePan(d.delta.dx, d.delta.dy, handleTouch);
ffi.cursorModel.updatePan(d.delta, d.localPosition, handleTouch);
}
onOneFingerPanEnd(DragEndDetails d) {
if (lastDeviceKind != PointerDeviceKind.touch) {
return;
}
if (isDesktop) {
ffi.cursorModel.clearRemoteWindowCoords();
}
inputModel.sendMouse('up', MouseButtons.left);
}