diff options
| author | Hennadii Stepanov <[email protected]> | 2018-10-19 10:39:25 +0300 |
|---|---|---|
| committer | Hennadii Stepanov <[email protected]> | 2018-12-06 18:23:31 +0200 |
| commit | 93009618b6d72b6bb253cabc4a5813d7aea18a67 (patch) | |
| tree | 27629130101d2f04b03d1ad558d54018d89bfebe /src/qt/bitcoin.cpp | |
| parent | Merge #14465: tests: Stop node before removing the notification file (diff) | |
| download | discoin-93009618b6d72b6bb253cabc4a5813d7aea18a67.tar.xz discoin-93009618b6d72b6bb253cabc4a5813d7aea18a67.zip | |
Fix start with the `-min` option
When GUI starts with the `-min` option, the `Minimize to tray instead of
the taskbar` option works as expected now.
Diffstat (limited to 'src/qt/bitcoin.cpp')
| -rw-r--r-- | src/qt/bitcoin.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index a014ad4b2..4a1576e88 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -487,14 +487,13 @@ void BitcoinApplication::initializeResult(bool success) } #endif - // If -min option passed, start window minimized. - if(gArgs.GetBoolArg("-min", false)) - { - window->showMinimized(); - } - else - { + // If -min option passed, start window minimized (iconified) or minimized to tray + if (!gArgs.GetBoolArg("-min", false)) { window->show(); + } else if (clientModel->getOptionsModel()->getMinimizeToTray() && window->hasTrayIcon()) { + // do nothing as the window is managed by the tray icon + } else { + window->showMinimized(); } Q_EMIT splashFinished(window); |