mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Do not do anything when middle clicking on the tray
This commit is contained in:
parent
fc462e82df
commit
6bbca9341d
|
@ -734,9 +734,7 @@ void Widget::confirmExecutableOpen(const QFileInfo &file)
|
||||||
|
|
||||||
void Widget::onIconClick(QSystemTrayIcon::ActivationReason reason)
|
void Widget::onIconClick(QSystemTrayIcon::ActivationReason reason)
|
||||||
{
|
{
|
||||||
switch (reason)
|
if (reason == QSystemTrayIcon::Trigger)
|
||||||
{
|
|
||||||
case QSystemTrayIcon::Trigger:
|
|
||||||
{
|
{
|
||||||
if (isHidden() || isMinimized())
|
if (isHidden() || isMinimized())
|
||||||
{
|
{
|
||||||
|
@ -756,22 +754,10 @@ void Widget::onIconClick(QSystemTrayIcon::ActivationReason reason)
|
||||||
wasMaximized = isMaximized();
|
wasMaximized = isMaximized();
|
||||||
hide();
|
hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
case QSystemTrayIcon::MiddleClick:
|
else if (reason == QSystemTrayIcon::Unknown)
|
||||||
wasMaximized = isMaximized();
|
{
|
||||||
if (Settings::getInstance().getMinimizeToTray())
|
|
||||||
hide();
|
|
||||||
else
|
|
||||||
showMinimized();
|
|
||||||
break;
|
|
||||||
case QSystemTrayIcon::Unknown:
|
|
||||||
if (isHidden())
|
|
||||||
forceShow();
|
forceShow();
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user