mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-14 01:11:28 +03:00
fix: last window location calculation
This commit is contained in:
@@ -96,8 +96,7 @@ class _FileManagerTabPageState extends State<FileManagerTabPage> {
|
||||
|
||||
void onRemoveId(String id) {
|
||||
if (tabController.state.value.tabs.isEmpty) {
|
||||
WindowController.fromWindowId(windowId()).hide();
|
||||
rustDeskWinManager.call(WindowType.Main, kWindowEventHide, {"id": windowId()});
|
||||
WindowController.fromWindowId(windowId()).close();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -107,8 +107,7 @@ class _PortForwardTabPageState extends State<PortForwardTabPage> {
|
||||
|
||||
void onRemoveId(String id) {
|
||||
if (tabController.state.value.tabs.isEmpty) {
|
||||
WindowController.fromWindowId(windowId()).hide();
|
||||
rustDeskWinManager.call(WindowType.Main, kWindowEventHide, {"id": windowId()});
|
||||
WindowController.fromWindowId(windowId()).close();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -97,9 +97,6 @@ class _ConnectionTabPageState extends State<ConnectionTabPage> {
|
||||
}
|
||||
_update_remote_count();
|
||||
});
|
||||
Future.delayed(Duration.zero, () {
|
||||
restoreWindowPosition(WindowType.RemoteDesktop, windowId: windowId());
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -321,10 +318,9 @@ class _ConnectionTabPageState extends State<ConnectionTabPage> {
|
||||
);
|
||||
}
|
||||
|
||||
void onRemoveId(String id) {
|
||||
void onRemoveId(String id) async {
|
||||
if (tabController.state.value.tabs.isEmpty) {
|
||||
WindowController.fromWindowId(windowId()).hide();
|
||||
rustDeskWinManager.call(WindowType.Main, kWindowEventHide, {"id": windowId()});
|
||||
await WindowController.fromWindowId(windowId()).close();
|
||||
}
|
||||
ConnectionTypeState.delete(id);
|
||||
_update_remote_count();
|
||||
|
||||
Reference in New Issue
Block a user