diff options
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoaintegration.mm')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoaintegration.mm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.mm b/src/plugins/platforms/cocoa/qcocoaintegration.mm index c021a551a7..f6a3b3943f 100644 --- a/src/plugins/platforms/cocoa/qcocoaintegration.mm +++ b/src/plugins/platforms/cocoa/qcocoaintegration.mm @@ -337,10 +337,20 @@ 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(); QCocoaMimeTypes::initializeMimeTypes(); + QWindowSystemInterfacePrivate::TabletEvent::setPlatformSynthesizesMouse(false); } QCocoaIntegration::~QCocoaIntegration() |