macOS: Don't tweak NSApp presentationOptions on startup

AppKit will initialize NSScreens nowadays, so we don't need to manually
trigger it.

Task-number: QTBUG-80193
Change-Id: Ic0251a1b978b9d4ff53f20e67902787cf529fa87
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
Tor Arne Vestbø 2019-11-24 22:06:27 +01:00
parent b63141fb14
commit 438702ac5f

View File

@ -197,16 +197,6 @@ QCocoaIntegration::QCocoaIntegration(const QStringList &paramList)
[cocoaApplication setMenu:[qtMenuLoader menu]];
}
// The presentation options such as whether or not the dock and/or menu bar is
// hidden (automatically by the system) affects the main screen's available
// geometry. Since we're initializing the screens synchronously at application
// startup we need to ensure that the presentation options have been propagated
// to the screen before we read out its properties. Normally OS X does this in
// an asynchronous callback, but that's too late for us. We force the propagation
// by explicitly setting the presentation option to the magic 'default value',
// which will resolve to an actual value and result in screen invalidation.
cocoaApplication.presentationOptions = NSApplicationPresentationDefault;
QCocoaScreen::initializeScreens();
QMacInternalPasteboardMime::initializeMimeTypes();