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"],
|
return LastWindowPosition(m["width"], m["height"], m["offsetWidth"],
|
||||||
m["offsetHeight"], m["isMaximized"]);
|
m["offsetHeight"], m["isMaximized"]);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
debugPrintStack(label: e.toString());
|
debugPrintStack(label: 'Failed to load LastWindowPosition "$content" ${e.toString()}');
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -93,9 +93,9 @@ class _RawTouchGestureDetectorRegionState
|
|||||||
}
|
}
|
||||||
if (handleTouch) {
|
if (handleTouch) {
|
||||||
ffi.cursorModel.move(d.localPosition.dx, d.localPosition.dy);
|
ffi.cursorModel.move(d.localPosition.dx, d.localPosition.dy);
|
||||||
}
|
|
||||||
inputModel.tapDown(MouseButtons.left);
|
inputModel.tapDown(MouseButtons.left);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onTapUp(TapUpDetails d) {
|
onTapUp(TapUpDetails d) {
|
||||||
if (lastDeviceKind != PointerDeviceKind.touch) {
|
if (lastDeviceKind != PointerDeviceKind.touch) {
|
||||||
@ -107,6 +107,13 @@ class _RawTouchGestureDetectorRegionState
|
|||||||
inputModel.tapUp(MouseButtons.left);
|
inputModel.tapUp(MouseButtons.left);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onTap() {
|
||||||
|
if (lastDeviceKind != PointerDeviceKind.touch) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
inputModel.tap(MouseButtons.left);
|
||||||
|
}
|
||||||
|
|
||||||
onDoubleTapDown(TapDownDetails d) {
|
onDoubleTapDown(TapDownDetails d) {
|
||||||
lastDeviceKind = d.kind;
|
lastDeviceKind = d.kind;
|
||||||
if (lastDeviceKind != PointerDeviceKind.touch) {
|
if (lastDeviceKind != PointerDeviceKind.touch) {
|
||||||
@ -115,6 +122,9 @@ class _RawTouchGestureDetectorRegionState
|
|||||||
if (handleTouch) {
|
if (handleTouch) {
|
||||||
ffi.cursorModel.move(d.localPosition.dx, d.localPosition.dy);
|
ffi.cursorModel.move(d.localPosition.dx, d.localPosition.dy);
|
||||||
}
|
}
|
||||||
|
if (!ffiModel.touchMode) {
|
||||||
|
inputModel.tapDown(MouseButtons.left);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onDoubleTap() {
|
onDoubleTap() {
|
||||||
@ -156,7 +166,7 @@ class _RawTouchGestureDetectorRegionState
|
|||||||
if (lastDeviceKind != PointerDeviceKind.touch) {
|
if (lastDeviceKind != PointerDeviceKind.touch) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (isDesktop || !handleTouch) {
|
if (isDesktop || !ffiModel.touchMode) {
|
||||||
inputModel.tap(MouseButtons.right);
|
inputModel.tap(MouseButtons.right);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -291,7 +301,8 @@ class _RawTouchGestureDetectorRegionState
|
|||||||
() => TapGestureRecognizer(), (instance) {
|
() => TapGestureRecognizer(), (instance) {
|
||||||
instance
|
instance
|
||||||
..onTapDown = onTapDown
|
..onTapDown = onTapDown
|
||||||
..onTapUp = onTapUp;
|
..onTapUp = onTapUp
|
||||||
|
..onTap = onTap;
|
||||||
}),
|
}),
|
||||||
DoubleTapGestureRecognizer:
|
DoubleTapGestureRecognizer:
|
||||||
GestureRecognizerFactoryWithHandlers<DoubleTapGestureRecognizer>(
|
GestureRecognizerFactoryWithHandlers<DoubleTapGestureRecognizer>(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user