1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-23 09:19:41 +01:00

Improved systray behaviour: Now it brings Tomahawk to front when it's not the Active App, instead of hiding it

Signed-off-by: Adria Arrufat <swiftscythe@gmail.com>
This commit is contained in:
Adria Arrufat 2012-05-09 22:42:59 +02:00
parent b2f7c5f7c5
commit 641eff8472

View File

@ -29,6 +29,7 @@
#include "Query.h"
#include "utils/Logger.h"
#include "utils/TomahawkUtilsGui.h"
#include <ActionCollection.h>
@ -198,13 +199,13 @@ TomahawkTrayIcon::onActivated( QSystemTrayIcon::ActivationReason reason )
case QSystemTrayIcon::Trigger:
{
TomahawkWindow* mainwindow = APP->mainWindow();
if ( mainwindow->isVisible() )
if (mainwindow->isActiveWindow())
{
mainwindow->hide();
}
else
{
mainwindow->show();
TomahawkUtils::bringToFront();
}
}
break;