Revert "fix: android, touch mode, move cursor (#8419)" (#8421)

This reverts commit dcba4615a2.
This commit is contained in:
RustDesk 2024-06-20 12:22:36 +08:00 committed by GitHub
parent dcba4615a2
commit 7956953669
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 20 additions and 73 deletions

View file

@ -717,8 +717,8 @@ class _KeyHelpToolsState extends State<KeyHelpTools> {
if (renderObject is RenderBox) {
final size = renderObject.size;
Offset pos = renderObject.localToGlobal(Offset.zero);
gFFI.cursorModel.keyHelpToolsVisibilityChanged(
Rect.fromLTWH(pos.dx, pos.dy, size.width, size.height));
gFFI.cursorModel.keyHelpToolsRect =
Rect.fromLTWH(pos.dx, pos.dy, size.width, size.height);
}
}
@ -730,7 +730,7 @@ class _KeyHelpToolsState extends State<KeyHelpTools> {
inputModel.command;
if (!_pin && !hasModifierOn && !widget.requestShow) {
gFFI.cursorModel.keyHelpToolsVisibilityChanged(null);
gFFI.cursorModel.keyHelpToolsRect = null;
return Offstage();
}
final size = MediaQuery.of(context).size;
@ -867,7 +867,7 @@ class ImagePaint extends StatelessWidget {
Widget build(BuildContext context) {
final m = Provider.of<ImageModel>(context);
final c = Provider.of<CanvasModel>(context);
final adjust = gFFI.cursorModel.adjustForKeyboard;
final adjust = gFFI.cursorModel.adjustForKeyboard();
var s = c.scale;
return CustomPaint(
painter: ImagePainter(
@ -881,7 +881,7 @@ class CursorPaint extends StatelessWidget {
Widget build(BuildContext context) {
final m = Provider.of<CursorModel>(context);
final c = Provider.of<CanvasModel>(context);
final adjust = gFFI.cursorModel.adjustForKeyboard;
final adjust = gFFI.cursorModel.adjustForKeyboard();
var s = c.scale;
double hotx = m.hotx;
double hoty = m.hoty;