Skip to content

Commit eaae4ba

Browse files
Honour the close setting when quitting from the tray canonical#3919
Previously, the tray menu action "Quit" caused a function to immediately destroy the window. Now the usual process of closing window is taking place. Signed-off-by: Artem <[email protected]>
1 parent dbf3c7c commit eaae4ba

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/client/gui/lib/main.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,9 @@ class _AppState extends ConsumerState<App> with WindowListener {
187187
case 'stop':
188188
stopAllInstances();
189189
default:
190+
if (!await windowManager.isVisible() || await windowManager.isMinimized()) {
191+
windowManager.showAndRestore();
192+
}
190193
showDialog(
191194
context: context,
192195
barrierDismissible: false,

src/client/gui/lib/tray_menu.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Future<void> setupTrayMenu(ProviderContainer providerContainer) async {
9595
await TrayMenu.instance.addLabel(
9696
'quit',
9797
label: 'Quit',
98-
callback: (_, __) => windowManager.destroy(),
98+
callback: (_, __) => windowManager.close(),
9999
);
100100

101101
await TrayMenu.instance.show(await _iconFilePath());

0 commit comments

Comments
 (0)