From 56fcc496cf7cd61adfa149105e0c20d127ba462c Mon Sep 17 00:00:00 2001 From: datguy Date: Wed, 6 Jun 2018 21:15:33 +0300 Subject: [PATCH] made the 'add account' popup box actually pop up to the foreground --- src/widgets/logindialog.cpp | 7 +++++++ src/widgets/settingspages/accountspage.cpp | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/widgets/logindialog.cpp b/src/widgets/logindialog.cpp index 393d36ccd..f4ed4841f 100644 --- a/src/widgets/logindialog.cpp +++ b/src/widgets/logindialog.cpp @@ -1,6 +1,9 @@ #include "widgets/logindialog.hpp" #include "common.hpp" #include "util/urlfetch.hpp" +#if FMT_USE_WINDOWS_H +#include +#endif #include #include @@ -187,6 +190,10 @@ void AdvancedLoginWidget::refreshButtons() LoginWidget::LoginWidget() { + #if FMT_USE_WINDOWS_H + ::SetWindowPos((HWND)this->winId(), HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW); + #endif + this->setLayout(&this->ui.mainLayout); this->ui.mainLayout.addWidget(&this->ui.tabWidget); diff --git a/src/widgets/settingspages/accountspage.cpp b/src/widgets/settingspages/accountspage.cpp index 0ee2266e2..6275c92cf 100644 --- a/src/widgets/settingspages/accountspage.cpp +++ b/src/widgets/settingspages/accountspage.cpp @@ -9,7 +9,6 @@ #include "widgets/logindialog.hpp" #include - #include #include #include @@ -37,6 +36,7 @@ AccountsPage::AccountsPage() static auto loginWidget = new LoginWidget(); loginWidget->show(); + loginWidget->raise(); }); view->getTableView()->setStyleSheet("background: #333");