File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -487,14 +487,13 @@ void BitcoinApplication::initializeResult(bool success)
487
487
}
488
488
#endif
489
489
490
- // If -min option passed, start window minimized.
491
- if (gArgs .GetBoolArg (" -min" , false ))
492
- {
493
- window->showMinimized ();
494
- }
495
- else
496
- {
490
+ // If -min option passed, start window minimized (iconified) or minimized to tray
491
+ if (!gArgs .GetBoolArg (" -min" , false )) {
497
492
window->show ();
493
+ } else if (clientModel->getOptionsModel ()->getMinimizeToTray () && window->hasTrayIcon ()) {
494
+ // do nothing as the window is managed by the tray icon
495
+ } else {
496
+ window->showMinimized ();
498
497
}
499
498
Q_EMIT splashFinished (window);
500
499
Original file line number Diff line number Diff line change @@ -82,6 +82,11 @@ class BitcoinGUI : public QMainWindow
82
82
#endif // ENABLE_WALLET
83
83
bool enableWallet = false ;
84
84
85
+ /* * Get the tray icon status.
86
+ Some systems have not "system tray" or "notification area" available.
87
+ */
88
+ bool hasTrayIcon () const { return trayIcon; }
89
+
85
90
protected:
86
91
void changeEvent (QEvent *e);
87
92
void closeEvent (QCloseEvent *event);
You can’t perform that action at this time.
0 commit comments