mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-05 21:57:41 +02: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:
@@ -29,6 +29,7 @@
|
|||||||
#include "Query.h"
|
#include "Query.h"
|
||||||
|
|
||||||
#include "utils/Logger.h"
|
#include "utils/Logger.h"
|
||||||
|
#include "utils/TomahawkUtilsGui.h"
|
||||||
#include <ActionCollection.h>
|
#include <ActionCollection.h>
|
||||||
|
|
||||||
|
|
||||||
@@ -198,13 +199,13 @@ TomahawkTrayIcon::onActivated( QSystemTrayIcon::ActivationReason reason )
|
|||||||
case QSystemTrayIcon::Trigger:
|
case QSystemTrayIcon::Trigger:
|
||||||
{
|
{
|
||||||
TomahawkWindow* mainwindow = APP->mainWindow();
|
TomahawkWindow* mainwindow = APP->mainWindow();
|
||||||
if ( mainwindow->isVisible() )
|
if (mainwindow->isActiveWindow())
|
||||||
{
|
{
|
||||||
mainwindow->hide();
|
mainwindow->hide();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mainwindow->show();
|
TomahawkUtils::bringToFront();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user