Skip to content

Commit

Permalink
Fixing "show / hide" action from tray icon menu. (#1154)
Browse files Browse the repository at this point in the history
* Fixing show hide action from tray icon menu

* Minor fix
  • Loading branch information
firstcryptoman authored Apr 10, 2022
1 parent cc12a11 commit 859e1fc
Showing 1 changed file with 9 additions and 15 deletions.
24 changes: 9 additions & 15 deletions src/qt/bitcoingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1378,24 +1378,18 @@ void BitcoinGUI::showNormalIfMinimized(bool fToggleHidden)
if(!clientModel)
return;

// activateWindow() (sometimes) helps with keyboard focus on Windows
if (isHidden())
{
show();
activateWindow();
}
else if (isMinimized())
{
showNormal();
activateWindow();
}
else if (GUIUtil::isObscured(this))
{
if (!isHidden() && !isMinimized() && !GUIUtil::isObscured(this) && fToggleHidden) {
hide();
} else {
// activateWindow() (sometimes) helps with keyboard focus on Windows
if (isMinimized()) {
showNormal();
} else {
show();
}
raise();
activateWindow();
}
else if(fToggleHidden)
hide();
}

void BitcoinGUI::toggleHidden()
Expand Down

0 comments on commit 859e1fc

Please sign in to comment.