Merge pull request #3026 from Kingtous/master
fix: macos location restore incorrectly
This commit is contained in:
commit
4d3f2bca6b
@ -113,6 +113,9 @@ class _ConnectionTabPageState extends State<ConnectionTabPage> {
|
|||||||
}
|
}
|
||||||
_update_remote_count();
|
_update_remote_count();
|
||||||
});
|
});
|
||||||
|
Future.delayed(Duration.zero, () {
|
||||||
|
restoreWindowPosition(WindowType.RemoteDesktop, windowId: windowId());
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -122,20 +122,20 @@ void runMainApp(bool startService) async {
|
|||||||
}
|
}
|
||||||
gFFI.userModel.refreshCurrentUser();
|
gFFI.userModel.refreshCurrentUser();
|
||||||
runApp(App());
|
runApp(App());
|
||||||
// restore the location of the main window before window hide or show
|
// Set window option.
|
||||||
|
WindowOptions windowOptions = getHiddenTitleBarWindowOptions();
|
||||||
|
windowManager.waitUntilReadyToShow(windowOptions, () async {
|
||||||
|
// Restore the location of the main window before window hide or show.
|
||||||
await restoreWindowPosition(WindowType.Main);
|
await restoreWindowPosition(WindowType.Main);
|
||||||
// check the startup argument, if we successfully handle the argument, we keep the main window hidden.
|
// Check the startup argument, if we successfully handle the argument, we keep the main window hidden.
|
||||||
if (checkArguments()) {
|
if (checkArguments()) {
|
||||||
windowManager.hide();
|
windowManager.hide();
|
||||||
} else {
|
} else {
|
||||||
windowManager.show();
|
windowManager.show();
|
||||||
windowManager.focus();
|
windowManager.focus();
|
||||||
// move registration of active main window here to prevent async visible check.
|
// Move registration of active main window here to prevent from async visible check.
|
||||||
rustDeskWinManager.registerActiveWindow(kWindowMainId);
|
rustDeskWinManager.registerActiveWindow(kWindowMainId);
|
||||||
}
|
}
|
||||||
// set window option
|
|
||||||
WindowOptions windowOptions = getHiddenTitleBarWindowOptions();
|
|
||||||
windowManager.waitUntilReadyToShow(windowOptions, () async {
|
|
||||||
windowManager.setOpacity(1);
|
windowManager.setOpacity(1);
|
||||||
});
|
});
|
||||||
windowManager.setTitle(getWindowName());
|
windowManager.setTitle(getWindowName());
|
||||||
|
@ -59,7 +59,7 @@ dependencies:
|
|||||||
desktop_multi_window:
|
desktop_multi_window:
|
||||||
git:
|
git:
|
||||||
url: https://github.com/Kingtous/rustdesk_desktop_multi_window
|
url: https://github.com/Kingtous/rustdesk_desktop_multi_window
|
||||||
ref: 057e6eb1bc7dcbcf9dafd1384274a611e4fe7124
|
ref: bc8604a88e52b2b6e64d2661ae49a71450a47af8
|
||||||
freezed_annotation: ^2.0.3
|
freezed_annotation: ^2.0.3
|
||||||
flutter_custom_cursor: ^0.0.2
|
flutter_custom_cursor: ^0.0.2
|
||||||
window_size:
|
window_size:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user