diff options
Diffstat (limited to 'Swift/QtUI')
-rw-r--r-- | Swift/QtUI/QtLoginWindow.cpp | 11 | ||||
-rw-r--r-- | Swift/QtUI/QtLoginWindowFactory.cpp | 2 |
2 files changed, 7 insertions, 6 deletions
diff --git a/Swift/QtUI/QtLoginWindow.cpp b/Swift/QtUI/QtLoginWindow.cpp index a18b161..66ac2db 100644 --- a/Swift/QtUI/QtLoginWindow.cpp +++ b/Swift/QtUI/QtLoginWindow.cpp @@ -19,6 +19,7 @@ #include <QToolButton> #include <QLabel> #include <QMenuBar> +#include <qdebug.h> #include "Swift/Controllers/UIEvents/UIEventStream.h" #include "Swift/Controllers/UIEvents/RequestXMLConsoleUIEvent.h" @@ -317,13 +318,13 @@ void QtLoginWindow::setMessage(const String& message) { } void QtLoginWindow::bringToFront() { - if (isHidden()) { - showNormal(); - raise(); - activateWindow(); + if (!isVisible()) { + window()->showNormal(); + window()->raise(); + window()->activateWindow(); } else { - hide(); + window()->hide(); } } diff --git a/Swift/QtUI/QtLoginWindowFactory.cpp b/Swift/QtUI/QtLoginWindowFactory.cpp index 65edeb6..2ac3dec 100644 --- a/Swift/QtUI/QtLoginWindowFactory.cpp +++ b/Swift/QtUI/QtLoginWindowFactory.cpp @@ -21,7 +21,7 @@ LoginWindow* QtLoginWindowFactory::createLoginWindow(UIEventStream* uiEventStrea window_ = new QtLoginWindow(uiEventStream); if (splitter_) { splitter_->insertWidget(0, window_); - return window_; + //return window_; } connect(systemTray_, SIGNAL(clicked()), window_, SLOT(bringToFront())); QVariant loginWindowGeometryVariant = settings_->getQSettings()->value("loginWindowGeometry"); |