mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-06-07 18:02:48 +08:00
try fix android mouse mode
Signed-off-by: dignow <linlong1265@gmail.com>
This commit is contained in:
parent
072338afae
commit
20cdb87e28
@ -1337,7 +1337,7 @@ class LastWindowPosition {
|
||||
return LastWindowPosition(m["width"], m["height"], m["offsetWidth"],
|
||||
m["offsetHeight"], m["isMaximized"]);
|
||||
} catch (e) {
|
||||
debugPrintStack(label: e.toString());
|
||||
debugPrintStack(label: 'Failed to load LastWindowPosition "$content" ${e.toString()}');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -93,8 +93,8 @@ class _RawTouchGestureDetectorRegionState
|
||||
}
|
||||
if (handleTouch) {
|
||||
ffi.cursorModel.move(d.localPosition.dx, d.localPosition.dy);
|
||||
inputModel.tapDown(MouseButtons.left);
|
||||
}
|
||||
inputModel.tapDown(MouseButtons.left);
|
||||
}
|
||||
|
||||
onTapUp(TapUpDetails d) {
|
||||
@ -107,6 +107,13 @@ class _RawTouchGestureDetectorRegionState
|
||||
inputModel.tapUp(MouseButtons.left);
|
||||
}
|
||||
|
||||
onTap() {
|
||||
if (lastDeviceKind != PointerDeviceKind.touch) {
|
||||
return;
|
||||
}
|
||||
inputModel.tap(MouseButtons.left);
|
||||
}
|
||||
|
||||
onDoubleTapDown(TapDownDetails d) {
|
||||
lastDeviceKind = d.kind;
|
||||
if (lastDeviceKind != PointerDeviceKind.touch) {
|
||||
@ -115,6 +122,9 @@ class _RawTouchGestureDetectorRegionState
|
||||
if (handleTouch) {
|
||||
ffi.cursorModel.move(d.localPosition.dx, d.localPosition.dy);
|
||||
}
|
||||
if (!ffiModel.touchMode) {
|
||||
inputModel.tapDown(MouseButtons.left);
|
||||
}
|
||||
}
|
||||
|
||||
onDoubleTap() {
|
||||
@ -156,7 +166,7 @@ class _RawTouchGestureDetectorRegionState
|
||||
if (lastDeviceKind != PointerDeviceKind.touch) {
|
||||
return;
|
||||
}
|
||||
if (isDesktop || !handleTouch) {
|
||||
if (isDesktop || !ffiModel.touchMode) {
|
||||
inputModel.tap(MouseButtons.right);
|
||||
}
|
||||
}
|
||||
@ -291,7 +301,8 @@ class _RawTouchGestureDetectorRegionState
|
||||
() => TapGestureRecognizer(), (instance) {
|
||||
instance
|
||||
..onTapDown = onTapDown
|
||||
..onTapUp = onTapUp;
|
||||
..onTapUp = onTapUp
|
||||
..onTap = onTap;
|
||||
}),
|
||||
DoubleTapGestureRecognizer:
|
||||
GestureRecognizerFactoryWithHandlers<DoubleTapGestureRecognizer>(
|
||||
|
Loading…
Reference in New Issue
Block a user