diff --git a/src/gui/Base/HTrayIcon.qml b/src/gui/Base/HTrayIcon.qml index b7a2d249..d653a6d2 100644 --- a/src/gui/Base/HTrayIcon.qml +++ b/src/gui/Base/HTrayIcon.qml @@ -30,10 +30,12 @@ SystemTrayIcon { tooltip: Qt.application.displayName icon.source: `../../icons/${iconPack}/tray-icon.png` - onActivated: - if (reason !== SystemTrayIcon.Context) - window.drawAttention() - + onActivated: { + if (reason === SystemTrayIcon.MiddleClick) + Qt.quit() + else if (reason !== SystemTrayIcon.Context) + window.visible ? window.hide() : window.drawAttention() + } menu: Menu { MenuItem {