mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-12 11:06:57 +00:00
@@ -47,6 +47,7 @@ class FfiModel with ChangeNotifier {
|
||||
bool _touchMode = false;
|
||||
Timer? _timer;
|
||||
var _reconnects = 1;
|
||||
bool _viewOnly = false;
|
||||
WeakReference<FFI> parent;
|
||||
|
||||
Map<String, bool> get permissions => _permissions;
|
||||
@@ -65,6 +66,8 @@ class FfiModel with ChangeNotifier {
|
||||
|
||||
bool get isPeerAndroid => _pi.platform == kPeerPlatformAndroid;
|
||||
|
||||
bool get viewOnly => _viewOnly;
|
||||
|
||||
set inputBlocked(v) {
|
||||
_inputBlocked = v;
|
||||
}
|
||||
@@ -373,7 +376,8 @@ class FfiModel with ChangeNotifier {
|
||||
_updateSessionWidthHeight(String id) {
|
||||
parent.target?.canvasModel.updateViewStyle();
|
||||
if (display.width <= 0 || display.height <= 0) {
|
||||
debugPrintStack(label: 'invalid display size (${display.width},${display.height})');
|
||||
debugPrintStack(
|
||||
label: 'invalid display size (${display.width},${display.height})');
|
||||
} else {
|
||||
bind.sessionSetSize(id: id, width: display.width, height: display.height);
|
||||
}
|
||||
@@ -516,6 +520,19 @@ class FfiModel with ChangeNotifier {
|
||||
//
|
||||
}
|
||||
}
|
||||
|
||||
void setViewOnly(String id, bool value) {
|
||||
if (value) {
|
||||
ShowRemoteCursorState.find(id).value = value;
|
||||
} else {
|
||||
ShowRemoteCursorState.find(id).value =
|
||||
bind.sessionGetToggleOptionSync(id: id, arg: 'show-remote-cursor');
|
||||
}
|
||||
if (_viewOnly != value) {
|
||||
_viewOnly = value;
|
||||
notifyListeners();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class ImageModel with ChangeNotifier {
|
||||
|
||||
Reference in New Issue
Block a user