Skip to content

Commit d4bed1a

Browse files
committed
Merge pull request #4524
49d5712 qt: Ignore showNormalIfMinimized in initialization or shutdown (Wladimir J. van der Laan)
2 parents 0f491f8 + 49d5712 commit d4bed1a

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

src/init.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,13 +179,13 @@ void HandleSIGHUP(int)
179179

180180
bool static InitError(const std::string &str)
181181
{
182-
uiInterface.ThreadSafeMessageBox(str, "", CClientUIInterface::MSG_ERROR | CClientUIInterface::NOSHOWGUI);
182+
uiInterface.ThreadSafeMessageBox(str, "", CClientUIInterface::MSG_ERROR);
183183
return false;
184184
}
185185

186186
bool static InitWarning(const std::string &str)
187187
{
188-
uiInterface.ThreadSafeMessageBox(str, "", CClientUIInterface::MSG_WARNING | CClientUIInterface::NOSHOWGUI);
188+
uiInterface.ThreadSafeMessageBox(str, "", CClientUIInterface::MSG_WARNING);
189189
return true;
190190
}
191191

src/qt/bitcoingui.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -783,11 +783,7 @@ void BitcoinGUI::message(const QString &title, const QString &message, unsigned
783783
if (!(buttons = (QMessageBox::StandardButton)(style & CClientUIInterface::BTN_MASK)))
784784
buttons = QMessageBox::Ok;
785785

786-
// Ensure we get users attention, but only if main window is visible
787-
// as we don't want to pop up the main window for messages that happen before
788-
// initialization is finished.
789-
if(!(style & CClientUIInterface::NOSHOWGUI))
790-
showNormalIfMinimized();
786+
showNormalIfMinimized();
791787
QMessageBox mBox((QMessageBox::Icon)nMBoxIcon, strTitle, message, buttons, this);
792788
int r = mBox.exec();
793789
if (ret != NULL)
@@ -924,6 +920,8 @@ void BitcoinGUI::setEncryptionStatus(int status)
924920

925921
void BitcoinGUI::showNormalIfMinimized(bool fToggleHidden)
926922
{
923+
if(!clientModel)
924+
return;
927925
// activateWindow() (sometimes) helps with keyboard focus on Windows
928926
if (isHidden())
929927
{

src/ui_interface.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ class CClientUIInterface
6363

6464
/** Force blocking, modal message box dialog (not just OS notification) */
6565
MODAL = 0x10000000U,
66-
/** Don't bring GUI to foreground. Use for messages during initialization */
67-
NOSHOWGUI = 0x20000000U,
6866

6967
/** Predefined combinations for certain default usage cases */
7068
MSG_INFORMATION = ICON_INFORMATION,

0 commit comments

Comments
 (0)