mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Fix behavior when clicking on the tray icon
This commit is contained in:
parent
0ef39aa06a
commit
fc462e82df
|
@ -738,31 +738,23 @@ void Widget::onIconClick(QSystemTrayIcon::ActivationReason reason)
|
|||
{
|
||||
case QSystemTrayIcon::Trigger:
|
||||
{
|
||||
if (isHidden())
|
||||
if (isHidden() || isMinimized())
|
||||
{
|
||||
show();
|
||||
activateWindow();
|
||||
if (wasMaximized)
|
||||
showMaximized();
|
||||
else
|
||||
showNormal();
|
||||
|
||||
activateWindow();
|
||||
}
|
||||
else if (isMinimized())
|
||||
else if (!isActiveWindow())
|
||||
{
|
||||
forceShow();
|
||||
activateWindow();
|
||||
if (wasMaximized)
|
||||
showMaximized();
|
||||
else
|
||||
showNormal();
|
||||
}
|
||||
else
|
||||
{
|
||||
wasMaximized = isMaximized();
|
||||
if (Settings::getInstance().getMinimizeToTray())
|
||||
hide();
|
||||
else
|
||||
showMinimized();
|
||||
hide();
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue
Block a user