summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-04-16 17:21:21 +0200
committerStanislaw Halik <sthalik@misaki.pl>2019-04-16 17:21:21 +0200
commit4017bc6534c1c52ad950589d758a3ff30d78f280 (patch)
tree08b2bc0f61de9c28a52d8c7f8786f7107af771e8
parent020eb402b5255aa286df445547abbf3dd0de915e (diff)
opentrack: avoid QWidget::raise() unless on OSX
-rw-r--r--opentrack/main-window.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/opentrack/main-window.cpp b/opentrack/main-window.cpp
index b90aa3bd..733fc731 100644
--- a/opentrack/main-window.cpp
+++ b/opentrack/main-window.cpp
@@ -540,12 +540,18 @@ static void show_window(QWidget& d, bool fresh)
d.show();
d.adjustSize();
+#ifdef __APPLE__
d.raise();
+#endif
+ d.activateWindow();
}
else
{
d.show();
+#ifdef __APPLE__
d.raise();
+#endif
+ d.activateWindow();
}
}
@@ -718,7 +724,9 @@ void main_window::ensure_tray()
show();
setVisible(true);
+#ifdef __APPLE__
raise(); // for OSX
+#endif
activateWindow(); // for Windows
}
@@ -756,7 +764,9 @@ void main_window::toggle_restore_from_tray(QSystemTrayIcon::ActivationReason e)
if (is_minimized)
{
+#ifdef __APPLE__
raise(); // for OSX
+#endif
activateWindow(); // for Windows
}
else