Skip to content

An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.

fix: Show My Cursor freezes in View Only mode when remote user mo... (#15936)

Robert Markovskia3bab27a2a78
diff --git a/flutter/lib/models/input_model.dart b/flutter/lib/models/input_model.dart
index a701e6e53..6ea23c2c9 100644
--- a/flutter/lib/models/input_model.dart
+++ b/flutter/lib/models/input_model.dart
@@ -1787,6 +1787,11 @@ class InputModel {
}
bool _checkPeerControlProtected(double x, double y) {
+ if (isViewOnly && showMyCursor) {
+ lastMousePos = ui.Offset(x, y);
+ return false;
+ }
+
final cursorModel = parent.target!.cursorModel;
if (cursorModel.isPeerControlProtected) {
lastMousePos = ui.Offset(x, y);
diff --git a/flutter/lib/models/model.dart b/flutter/lib/models/model.dart
index 129f67dea..bd564ba3b 100644
--- a/flutter/lib/models/model.dart
+++ b/flutter/lib/models/model.dart
@@ -2498,6 +2498,7 @@ class CanvasModel with ChangeNotifier {
}
void updateLocalCursor(double x, double y) {
+ if (parent.target?.ffiModel.viewOnly == true) return;
// If keyboard is not permitted, do not move cursor when mouse is moving.
if (parent.target != null && parent.target!.ffiModel.keyboard) {
// Draw cursor if is not desktop.