summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-09-01 18:36:02 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-09-01 18:36:02 (GMT)
commit776c7f67e845e9193993cec42fa60b2e418e9c75 (patch)
treeccca6a28dc6fbf46e0960616e6a066e540dd922a /Swift/QtUI/QtLoginWindow.cpp
parentfc049089490fd2b7a3693da782eb8ac11a86e26b (diff)
downloadswift-776c7f67e845e9193993cec42fa60b2e418e9c75.zip
swift-776c7f67e845e9193993cec42fa60b2e418e9c75.tar.bz2
Fix show/hide behavior of SystemTray.
Show now brings the window to front and activates it. Clicking on the tray hides the application if it is visible.
Diffstat (limited to 'Swift/QtUI/QtLoginWindow.cpp')
-rw-r--r--Swift/QtUI/QtLoginWindow.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/Swift/QtUI/QtLoginWindow.cpp b/Swift/QtUI/QtLoginWindow.cpp
index 2a25420..9694364 100644
--- a/Swift/QtUI/QtLoginWindow.cpp
+++ b/Swift/QtUI/QtLoginWindow.cpp
@@ -169,4 +169,15 @@ void QtLoginWindow::setMessage(const String& message) {
}
}
+void QtLoginWindow::bringToFront() {
+ if (isHidden()) {
+ showNormal();
+ raise();
+ activateWindow();
+ }
+ else {
+ hide();
+ }
+}
+
}