diff options
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoaintegration.mm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.mm b/src/plugins/platforms/cocoa/qcocoaintegration.mm index 91d4b2706b..933160b2ca 100644 --- a/src/plugins/platforms/cocoa/qcocoaintegration.mm +++ b/src/plugins/platforms/cocoa/qcocoaintegration.mm @@ -331,6 +331,15 @@ QCocoaIntegration::QCocoaIntegration(const QStringList ¶mList) [newDelegate setMenuLoader:qtMenuLoader]; } + // 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; updateScreens(); QMacInternalPasteboardMime::initializeMimeTypes(); |