summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2019-10-27 18:57:56 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2019-10-27 20:19:01 +0100
commitdcbe25bbbb603bc335d7cf0982a80293289b0d8f (patch)
tree70db4b0fba57f584e79de82f5073718eafbdfcb2
parent3ee634d520b28143d4bbbf46c011449bade917de (diff)
macOS: Only skip screen reconfigure if primary screen changed
Change-Id: Ia5d208ace5086e8e92f95f859383773894a18768 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
-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 " : "")