mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-01-19 08:23:01 +08:00
fix session option zoom cursor
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
parent
5d24bc93c6
commit
db18f4ab26
@ -70,8 +70,7 @@ class _RemotePageState extends State<RemotePage>
|
|||||||
ShowRemoteCursorState.init(id);
|
ShowRemoteCursorState.init(id);
|
||||||
RemoteCursorMovedState.init(id);
|
RemoteCursorMovedState.init(id);
|
||||||
final optZoomCursor = 'zoom-cursor';
|
final optZoomCursor = 'zoom-cursor';
|
||||||
PeerBoolOption.init(id, optZoomCursor,
|
PeerBoolOption.init(id, optZoomCursor, () => false);
|
||||||
() => bind.sessionGetToggleOptionSync(id: id, arg: optZoomCursor));
|
|
||||||
_zoomCursor = PeerBoolOption.find(id, optZoomCursor);
|
_zoomCursor = PeerBoolOption.find(id, optZoomCursor);
|
||||||
_showRemoteCursor = ShowRemoteCursorState.find(id);
|
_showRemoteCursor = ShowRemoteCursorState.find(id);
|
||||||
_keyboardEnabled = KeyboardEnabledState.find(id);
|
_keyboardEnabled = KeyboardEnabledState.find(id);
|
||||||
@ -91,9 +90,7 @@ class _RemotePageState extends State<RemotePage>
|
|||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
_initStates(widget.id);
|
_initStates(widget.id);
|
||||||
|
|
||||||
_ffi = FFI();
|
_ffi = FFI();
|
||||||
|
|
||||||
Get.put(_ffi, tag: widget.id);
|
Get.put(_ffi, tag: widget.id);
|
||||||
_ffi.start(widget.id);
|
_ffi.start(widget.id);
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
@ -107,8 +104,11 @@ class _RemotePageState extends State<RemotePage>
|
|||||||
_rawKeyFocusNode.requestFocus();
|
_rawKeyFocusNode.requestFocus();
|
||||||
_ffi.ffiModel.updateEventListener(widget.id);
|
_ffi.ffiModel.updateEventListener(widget.id);
|
||||||
_ffi.qualityMonitorModel.checkShowQualityMonitor(widget.id);
|
_ffi.qualityMonitorModel.checkShowQualityMonitor(widget.id);
|
||||||
|
// Session option should be set after models.dart/FFI.start
|
||||||
_showRemoteCursor.value = bind.sessionGetToggleOptionSync(
|
_showRemoteCursor.value = bind.sessionGetToggleOptionSync(
|
||||||
id: widget.id, arg: 'show-remote-cursor');
|
id: widget.id, arg: 'show-remote-cursor');
|
||||||
|
_zoomCursor.value =
|
||||||
|
bind.sessionGetToggleOptionSync(id: widget.id, arg: 'zoom-cursor');
|
||||||
if (!_isCustomCursorInited) {
|
if (!_isCustomCursorInited) {
|
||||||
customCursorController.registerNeedUpdateCursorCallback(
|
customCursorController.registerNeedUpdateCursorCallback(
|
||||||
(String? lastKey, String? currentKey) async {
|
(String? lastKey, String? currentKey) async {
|
||||||
|
Loading…
Reference in New Issue
Block a user