diff options
author | Gabriel de Dietrich <gabriel.dedietrich@qt.io> | 2017-07-13 16:34:32 -0700 |
---|---|---|
committer | Gabriel de Dietrich <gabriel.dedietrich@qt.io> | 2017-07-13 16:36:10 -0700 |
commit | d38fe875c7850ca2c6ca28f91e94ae276735fac8 (patch) | |
tree | e5c92cef74e0853490d77cf0139b23f00d548a6e /src/plugins/platforms/cocoa/qnswindowdelegate.mm | |
parent | ac4e848c9802377b7c4ff673180f28b9ca76b746 (diff) | |
parent | 627f0a7f7d775ecd263b95dd07fca44bfcb0c5cf (diff) |
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
src/widgets/widgets/qmainwindowlayout.cpp
Change-Id: I306b4f5ad11bceb336c9091241b468d455fe6bb6
Diffstat (limited to 'src/plugins/platforms/cocoa/qnswindowdelegate.mm')
-rw-r--r-- | src/plugins/platforms/cocoa/qnswindowdelegate.mm | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qnswindowdelegate.mm b/src/plugins/platforms/cocoa/qnswindowdelegate.mm index ce74aa9973..e5041fb863 100644 --- a/src/plugins/platforms/cocoa/qnswindowdelegate.mm +++ b/src/plugins/platforms/cocoa/qnswindowdelegate.mm @@ -78,6 +78,22 @@ 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_UNUSED(window); + Q_ASSERT(NSEqualSizes(m_cocoaWindow->screen()->geometry().size().toCGSize(), proposedSize)); + return proposedSize; +} +#endif + - (BOOL)window:(NSWindow *)window shouldPopUpDocumentPathMenu:(NSMenu *)menu { Q_UNUSED(window); |