Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.11.1
-
None
-
-
10565c5ef32457443cc950c26e2d8fab6941dac1 (qt/qtbase/5.12)
Description
The Screen change listener logic is coded as part of QCocoaApplicationDelegate. The problem is QCocoaIntegration doesn't initialize a QCocoaApplicationDelegate if we're running in AA_PluginApplication.
This makes sense if we don't want the Qt Menu or the custom delegate methods, but we ALWAYS want to keep the list of QScreens in sync with the screens in OS, otherwise functions like QWindow::setGeometry will fail when pluging in new displays/projects while the application is running.
// ### For AA_MacPluginApplication we don't want to load the menu nib.
// Qt 4 also does not set the application delegate, so that behavior
// is matched here.
if (!QCoreApplication::testAttribute(Qt::AA_PluginApplication))