1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-06 22:26:32 +02:00

Merge pull request #89 from swiftscythe/master

Improved systray behaviour
This commit is contained in:
Dominik Schmidt
2012-05-10 12:03:50 -07:00

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;