Skip to content

Commit

Permalink
call windowManager.restore() before windowManager.show()
Browse files Browse the repository at this point in the history
  • Loading branch information
levkropp committed Sep 16, 2024
1 parent fa2b290 commit 99b27ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/client/gui/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ class _AppState extends ConsumerState<App> with WindowListener {
final primary = ref.read(clientSettingProvider(primaryNameKey));
if (vms.contains(primary)) {
ref.read(sidebarKeyProvider.notifier).set('vm-$primary');
windowManager.restore();
windowManager.show();
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/client/gui/lib/tray_menu.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Future<void> setupTrayMenu(ProviderContainer providerContainer) async {
label: 'Toggle window',
callback: (_, __) async => await windowManager.isVisible()
? windowManager.hide()
: windowManager.show(),
: windowManager.restore().then((_) => windowManager.show()),
);
}

Expand Down Expand Up @@ -207,6 +207,7 @@ Future<void> _updateTrayMenu(
if (providerContainer.exists(provider)) {
providerContainer.read(provider.notifier).start();
}
windowManager.restore();
windowManager.show();
},
);
Expand Down

0 comments on commit 99b27ab

Please sign in to comment.