summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSilarn <jrim@rimpo.org>2018-04-18 11:46:42 -0500
committerSilarn <jrim@rimpo.org>2018-04-18 11:46:42 -0500
commit7e0454276207cb70feeb05850847204d1bb43fd9 (patch)
tree5b45fd733c494cfff97ee4fe786d844c1545c5b1 /src
parent08b56ee783131537d3f87e60819e88316ea1e062 (diff)
Some tweaks to make MO the top window when loading or changing games
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index d67c2673..2e496e0f 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -72,6 +72,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include <QDesktopServices>
#include <QLibraryInfo>
#include <QSslSocket>
+#include <QtPlatformHeaders/QWindowsWindowFunctions>
#include <boost/scoped_array.hpp>
@@ -481,6 +482,8 @@ int runApplication(MOApplication &application, SingleInstance &instance,
return 1;
}
+ QWindowsWindowFunctions::setWindowActivationBehavior(QWindowsWindowFunctions::AlwaysActivateWindow);
+
QStringList arguments = application.arguments();
try {
@@ -539,6 +542,7 @@ int runApplication(MOApplication &application, SingleInstance &instance,
"start the game correctly if this is set "
"incorrectly!)"),
nullptr);
+ selection.setWindowFlag(Qt::WindowStaysOnTopHint, true);
int index = 0;
for (const QString &edition : editions) {
selection.addChoice(edition, "", index++);
@@ -602,6 +606,7 @@ int runApplication(MOApplication &application, SingleInstance &instance,
QPixmap pixmap(splashPath);
QSplashScreen splash(pixmap);
splash.show();
+ splash.activateWindow();
NexusInterface::instance(&pluginContainer)->getAccessManager()->startLoginCheck();
@@ -630,6 +635,7 @@ int runApplication(MOApplication &application, SingleInstance &instance,
qDebug("displaying main window");
mainWindow.show();
+ mainWindow.activateWindow();
splash.finish(&mainWindow);
return application.exec();