diff options
| author | Jeremy Rimpo <jrim@rimpo.org> | 2019-08-02 00:33:02 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-08-02 00:33:02 -0500 |
| commit | bdf45aea69ab7df0b01eb87cc80a2641ea4261d0 (patch) | |
| tree | 88a91f59956e8be80c159f8d765e90859eb15d13 /src/main.cpp | |
| parent | 1f1b838c2b3fd3148d2c2a1a8fe6fcf9fb07383f (diff) | |
| parent | 2b213fe7ce4b75afd6f7d6418d3ccd2cf6f55070 (diff) | |
Merge pull request #806 from ModOrganizer2/qt-5.13
Qt 5.13
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp index 4359c645..bf4e5b97 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -666,9 +666,12 @@ int runApplication(MOApplication &application, SingleInstance &instance, if (settings.contains("window_monitor")) { const int monitor = settings.value("window_monitor").toInt(); - if (monitor != -1) { - QDesktopWidget* desktop = QApplication::desktop(); - const QPoint center = desktop->availableGeometry(monitor).center(); + if (monitor != -1 && QGuiApplication::screens().size() > monitor) { + QGuiApplication::screens().at(monitor)->geometry().center(); + const QPoint center = QGuiApplication::screens().at(monitor)->geometry().center(); + splash.move(center - splash.rect().center()); + } else { + const QPoint center = QGuiApplication::primaryScreen()->geometry().center(); splash.move(center - splash.rect().center()); } } |
