diff options
author | Stefan Hacker <dd0t@users.sourceforge.net> | 2014-10-30 23:25:20 +0300 |
---|---|---|
committer | Stefan Hacker <dd0t@users.sourceforge.net> | 2014-10-30 23:25:20 +0300 |
commit | a120c8eb28c0dfcdfdb0981c63147bb37d45df2c (patch) | |
tree | 6eff959c0d5f44ab86b1d956d7ad9dbcfbca306d | |
parent | 6f44613986e92efcece5f679b450c357c8b6e19b (diff) |
Fix issue with tray icon double clicking.
When clicking the tray icon in rapid succession on
windows the next click on it wouldn't register.
Analysis showed the signal really didn't reach the
handler. It seems like there are some bad things
happening when calling activateWindow() in this
handler as when it is called this issue disappears.
As our setWindowState call should perform window
activation anyways we now simply rely on it and
remove the other call. Also unified both track
click handlers.
Fixes #1452
-rw-r--r-- | src/mumble/MainWindow.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/mumble/MainWindow.cpp b/src/mumble/MainWindow.cpp index 24116b9fd..afbc2ff4c 100644 --- a/src/mumble/MainWindow.cpp +++ b/src/mumble/MainWindow.cpp @@ -2682,11 +2682,9 @@ void MainWindow::trayAboutToShow() { } void MainWindow::on_Icon_messageClicked() { - if (isMinimized()) - setWindowState((windowState() & ~Qt::WindowMinimized) | Qt::WindowActive); + setWindowState((windowState() & ~Qt::WindowMinimized) | Qt::WindowActive); show(); raise(); - activateWindow(); } void MainWindow::on_Icon_activated(QSystemTrayIcon::ActivationReason reason) { @@ -2694,10 +2692,7 @@ void MainWindow::on_Icon_activated(QSystemTrayIcon::ActivationReason reason) { case QSystemTrayIcon::Trigger: case QSystemTrayIcon::DoubleClick: case QSystemTrayIcon::MiddleClick: - setWindowState((windowState() & ~Qt::WindowMinimized) | Qt::WindowActive); - show(); - raise(); - activateWindow(); + on_Icon_messageClicked(); default: break; } } |