From f3c39a69bc5fd9188f030777a8a9ed350e7067fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Fri, 14 Jul 2017 16:48:27 +0200 Subject: macOS: Don't assume the proposed fullscreen size matches the screen size MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sometimes AppKit will pass in a proposed size that's smaller than the geometry of the screen. We don't know why, but shouldn't assert. Change-Id: I9970c5f587e1e0fb3f2fa932de5a32ac4e1eb76d Reviewed-by: Morten Johan Sørvig Reviewed-by: Tor Arne Vestbø --- src/plugins/platforms/cocoa/qnswindowdelegate.mm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/platforms/cocoa/qnswindowdelegate.mm b/src/plugins/platforms/cocoa/qnswindowdelegate.mm index e5041fb863..8295d4a36c 100644 --- a/src/plugins/platforms/cocoa/qnswindowdelegate.mm +++ b/src/plugins/platforms/cocoa/qnswindowdelegate.mm @@ -88,9 +88,9 @@ */ - (NSSize)window:(NSWindow *)window willUseFullScreenContentSize:(NSSize)proposedSize { - Q_UNUSED(window); - Q_ASSERT(NSEqualSizes(m_cocoaWindow->screen()->geometry().size().toCGSize(), proposedSize)); - return proposedSize; + Q_UNUSED(proposedSize); + Q_ASSERT(window == m_cocoaWindow->nativeWindow()); + return m_cocoaWindow->screen()->geometry().size().toCGSize(); } #endif -- cgit v1.2.3