Skip to content

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

Remote window restore, add 300 milliseconds delay for maximizing after the frame is restored

dignow4fc65aac8479
diff --git a/flutter/lib/common.dart b/flutter/lib/common.dart
index 48323d5fa..208c7f7c8 100644
--- a/flutter/lib/common.dart
+++ b/flutter/lib/common.dart
@@ -1699,7 +1699,10 @@ Future<bool> restoreWindowPosition(WindowType type,
}
if (lpos.isMaximized == true) {
await restoreFrame();
- await wc.maximize();
+ // An duration is needed to avoid the window being restored after maximized.
+ Future.delayed(Duration(milliseconds: 300), () async {
+ await wc.maximize();
+ });
} else {
await restoreFrame();
}