restore window pos

Signed-off-by: dignow <linlong1265@gmail.com>
This commit is contained in:
dignow
2023-08-08 18:14:01 +08:00
parent 4d3f5373d4
commit 32fe330946
5 changed files with 21 additions and 3 deletions

View File

@@ -1542,8 +1542,13 @@ Future<bool> restoreWindowPosition(WindowType type,
bool isRemotePeerPos = false;
String? pos;
if (type == WindowType.RemoteDesktop && windowId != null && peerId != null) {
pos = await bind.sessionGetFlutterConfigByPeerId(
id: peerId, k: kWindowPrefix);
if (desktopType == DesktopType.main) {
pos = bind.mainGetPeerFlutterConfigSync(
id: peerId, k: kWindowPrefix + type.name);
} else {
pos = await bind.sessionGetFlutterConfigByPeerId(
id: peerId, k: kWindowPrefix);
}
isRemotePeerPos = pos != null;
}
pos ??= bind.getLocalFlutterConfig(k: kWindowPrefix + type.name);