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

Signed-off-by: dignow <linlong1265@gmail.com>
This commit is contained in:
dignow 2023-09-03 22:27:42 +08:00
parent bf32477f89
commit 4fc65aac84

View File

@ -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();
}