From e68e776bdf710b1482a7de3a344eaccf95d224c9 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Thu, 25 Nov 2010 08:02:28 +0100 Subject: [PATCH] * React to single- & double-clicks on the TrayIcon. --- src/tomahawktrayicon.cpp | 2 +- src/tomahawkwindow.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tomahawktrayicon.cpp b/src/tomahawktrayicon.cpp index 2698f4108..25a136288 100644 --- a/src/tomahawktrayicon.cpp +++ b/src/tomahawktrayicon.cpp @@ -109,7 +109,7 @@ TomahawkTrayIcon::onActivated( QSystemTrayIcon::ActivationReason reason ) { switch( reason ) { - case QSystemTrayIcon::DoubleClick: + case QSystemTrayIcon::Trigger: { TomahawkWindow* mainwindow = APP->mainWindow(); if ( mainwindow->isVisible() ) diff --git a/src/tomahawkwindow.cpp b/src/tomahawkwindow.cpp index 4b0b54a4c..ab875ae40 100644 --- a/src/tomahawkwindow.cpp +++ b/src/tomahawkwindow.cpp @@ -178,8 +178,9 @@ TomahawkWindow::closeEvent( QCloseEvent* e ) #ifndef Q_WS_MAC if ( QSystemTrayIcon::isSystemTrayAvailable() ) { - e->ignore(); hide(); + e->ignore(); + return; } #endif