macOS: Don't assume the proposed fullscreen size matches the screen size

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 <morten.sorvig@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
Tor Arne Vestbø 2017-07-14 16:48:27 +02:00
parent c7ec07d401
commit f3c39a69bc

View File

@ -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