fix: save frame, LateInitializationError (#13265)

Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
fufesou
2025-10-24 17:20:56 +08:00
committed by GitHub
parent 9058ef3344
commit 938e165470
3 changed files with 34 additions and 18 deletions

View File

@@ -475,7 +475,11 @@ class RustDeskMultiWindowManager {
final shouldSavePos = type != WindowType.Terminal || i == windows.length - 1;
if (shouldSavePos) {
debugPrint("closing multi window, type: ${type.toString()} id: $wId");
await saveWindowPosition(type, windowId: wId);
try {
await saveWindowPosition(type, windowId: wId);
} catch (e) {
debugPrint('Failed to save window position of $wId, $e');
}
}
try {
await WindowController.fromWindowId(wId).setPreventClose(false);