mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-21 08:53:20 +03:00
fix: keep window pos after new conn (#8834)
1. Keep window pos 2. Do some init in StatefulWidget constructor. If try init in its state class, it may be too late. Because I see the init function is called after building the widget tree. Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
@@ -45,7 +45,9 @@ class RemotePage extends StatefulWidget {
|
||||
this.switchUuid,
|
||||
this.forceRelay,
|
||||
this.isSharedPassword,
|
||||
}) : super(key: key);
|
||||
}) : super(key: key) {
|
||||
initSharedStates(id);
|
||||
}
|
||||
|
||||
final String id;
|
||||
final SessionID? sessionId;
|
||||
@@ -99,7 +101,6 @@ class _RemotePageState extends State<RemotePage>
|
||||
}
|
||||
|
||||
void _initStates(String id) {
|
||||
initSharedStates(id);
|
||||
_zoomCursor = PeerBoolOption.find(id, kOptionZoomCursor);
|
||||
_showRemoteCursor = ShowRemoteCursorState.find(id);
|
||||
_keyboardEnabled = KeyboardEnabledState.find(id);
|
||||
|
||||
Reference in New Issue
Block a user