Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Hacker <dd0t@users.sourceforge.net>2014-10-30 23:25:20 +0300
committerStefan Hacker <dd0t@users.sourceforge.net>2014-10-30 23:25:20 +0300
commita120c8eb28c0dfcdfdb0981c63147bb37d45df2c (patch)
tree6eff959c0d5f44ab86b1d956d7ad9dbcfbca306d
parent6f44613986e92efcece5f679b450c357c8b6e19b (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.cpp9
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;
}
}