macOS: Only skip screen reconfigure if primary screen changed
Change-Id: Ia5d208ace5086e8e92f95f859383773894a18768 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit dcbe25bbbb603bc335d7cf0982a80293289b0d8f) Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
577b6554f0
commit
7f0aaa88ef
@ -93,11 +93,10 @@ void QCocoaScreen::initializeScreens()
|
|||||||
mainDisplay->updateProperties();
|
mainDisplay->updateProperties();
|
||||||
qCInfo(lcQpaScreen) << "Primary screen changed to" << mainDisplay;
|
qCInfo(lcQpaScreen) << "Primary screen changed to" << mainDisplay;
|
||||||
QWindowSystemInterface::handlePrimaryScreenChanged(mainDisplay);
|
QWindowSystemInterface::handlePrimaryScreenChanged(mainDisplay);
|
||||||
|
if (cocoaScreen == mainDisplay)
|
||||||
|
return; // Already reconfigured
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cocoaScreen == mainDisplay)
|
|
||||||
return; // Already reconfigured
|
|
||||||
|
|
||||||
cocoaScreen->updateProperties();
|
cocoaScreen->updateProperties();
|
||||||
qCInfo(lcQpaScreen) << "Reconfigured" << cocoaScreen;
|
qCInfo(lcQpaScreen) << "Reconfigured" << cocoaScreen;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user