fix, set window position before show when reusing window
Signed-off-by: dignow <linlong1265@gmail.com>
This commit is contained in:
parent
09a6b3c30a
commit
28cbe0f464
@ -1543,6 +1543,8 @@ Future<bool> restoreWindowPosition(WindowType type,
|
||||
|
||||
bool isRemotePeerPos = false;
|
||||
String? pos;
|
||||
// No need to check mainGetLocalBoolOptionSync(kOptionOpenNewConnInTabs)
|
||||
// Though "open in tabs" is true and the new window restore peer position, it's ok.
|
||||
if (type == WindowType.RemoteDesktop && windowId != null && peerId != null) {
|
||||
// If the restore position is called by main window, and the peer id is not null
|
||||
// then we may need to get the position by reading the peer config.
|
||||
|
@ -98,9 +98,9 @@ class RustDeskMultiWindowManager {
|
||||
if (_inactiveWindows.isNotEmpty) {
|
||||
for (final windowId in windows) {
|
||||
if (_inactiveWindows.contains(windowId)) {
|
||||
await DesktopMultiWindow.invokeMethod(windowId, methodName, msg);
|
||||
await restoreWindowPosition(type,
|
||||
windowId: windowId, peerId: remoteId);
|
||||
await DesktopMultiWindow.invokeMethod(windowId, methodName, msg);
|
||||
WindowController.fromWindowId(windowId).show();
|
||||
registerActiveWindow(windowId);
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user