summaryrefslogtreecommitdiffhomepage
path: root/gui
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-04-27 05:48:59 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-04-27 05:48:59 +0200
commit0093216223891e912fe0e6ef6f30e84dc0552880 (patch)
tree53da2dc4a772b3d7aaea80b0efe122024dca3c07 /gui
parent53214de869ac2a30ee19d7ea68c809fe7f7ef8e3 (diff)
gui: make tray click raise the window also
Issue: #342
Diffstat (limited to 'gui')
-rwxr-xr-x[-rw-r--r--]gui/ui.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/gui/ui.cpp b/gui/ui.cpp
index 31bce40b..ffdbf867 100644..100755
--- a/gui/ui.cpp
+++ b/gui/ui.cpp
@@ -548,7 +548,9 @@ void MainWindow::ensure_tray()
void MainWindow::restore_from_tray(QSystemTrayIcon::ActivationReason)
{
show();
- setWindowState(Qt::WindowNoState);
+ setWindowState( (windowState() & ~Qt::WindowMinimized) | Qt::WindowActive);
+ raise(); // for MacOS
+ activateWindow(); // for Windows
}
void MainWindow::changeEvent(QEvent* e)