diff options
Diffstat (limited to 'src/plugins/platforms/cocoa/qnswindowdelegate.mm')
-rw-r--r-- | src/plugins/platforms/cocoa/qnswindowdelegate.mm | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qnswindowdelegate.mm b/src/plugins/platforms/cocoa/qnswindowdelegate.mm index ce74aa9973..a18fe693fa 100644 --- a/src/plugins/platforms/cocoa/qnswindowdelegate.mm +++ b/src/plugins/platforms/cocoa/qnswindowdelegate.mm @@ -78,6 +78,21 @@ return m_cocoaWindow->screen()->availableGeometry().toCGRect(); } +#if QT_MACOS_DEPLOYMENT_TARGET_BELOW(__MAC_10_11) +/* + AppKit on OS X 10.10 wrongly calls windowWillUseStandardFrame:defaultFrame + from -[NSWindow _frameForFullScreenMode] when going into fullscreen, resulting + in black bars on top and bottom of the window. By implementing the following + method, AppKit will choose that instead, and resolve the right fullscreen + geometry. +*/ +- (NSSize)window:(NSWindow *)window willUseFullScreenContentSize:(NSSize)proposedSize +{ + Q_ASSERT(NSEqualSizes(m_cocoaWindow->screen()->geometry().size().toCGSize(), proposedSize)); + return proposedSize; +} +#endif + - (BOOL)window:(NSWindow *)window shouldPopUpDocumentPathMenu:(NSMenu *)menu { Q_UNUSED(window); |