summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/plugins/platforms/cocoa/qcocoascreen.mm5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoascreen.mm b/src/plugins/platforms/cocoa/qcocoascreen.mm
index aaaf9d0dcc..40273bac84 100644
--- a/src/plugins/platforms/cocoa/qcocoascreen.mm
+++ b/src/plugins/platforms/cocoa/qcocoascreen.mm
@@ -114,11 +114,10 @@ void QCocoaScreen::initializeScreens()
mainDisplay->updateProperties();
qCInfo(lcQpaScreen) << "Primary screen changed to" << mainDisplay;
QWindowSystemInterface::handlePrimaryScreenChanged(mainDisplay);
+ if (cocoaScreen == mainDisplay)
+ return; // Already reconfigured
}
- if (cocoaScreen == mainDisplay)
- return; // Already reconfigured
-
cocoaScreen->updateProperties();
qCInfo(lcQpaScreen).nospace() << "Reconfigured " <<
(primaryScreen() == cocoaScreen ? "primary " : "")