macOS: fix 32-bit builds

amends e39a436d0c and
1ad6ae21f0.

Change-Id: Ib5c0b516ea2e5ec8d89f3e2e9888ef3eb8de6de4
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
bb10
Jake Petroules 2016-11-04 03:48:22 -07:00 committed by Tony Sarajärvi
parent bc4f672cc6
commit 825bb10d9b
2 changed files with 3 additions and 3 deletions

View File

@ -122,8 +122,8 @@ void QCocoaScreen::updateGeometry()
// At this point the geometry is in native coordinates, but the size
// is correct, which we take advantage of next when we map the native
// coordinates to the Qt coordinate system.
m_geometry = QRectF::fromCGRect(m_nsScreen.frame).toRect();
m_availableGeometry = QRectF::fromCGRect(m_nsScreen.visibleFrame).toRect();
m_geometry = QRectF::fromCGRect(NSRectToCGRect(m_nsScreen.frame)).toRect();
m_availableGeometry = QRectF::fromCGRect(NSRectToCGRect(m_nsScreen.visibleFrame)).toRect();
// The reference screen for the geometry is always the primary screen, but since
// we may be in the process of creating and registering the primary screen, we

View File

@ -1662,7 +1662,7 @@ QCocoaNSWindow *QCocoaWindow::createNSWindow(bool shouldBeChildNSWindow, bool sh
rect.translate(-targetScreen->geometry().topLeft());
QCocoaScreen *cocoaScreen = static_cast<QCocoaScreen *>(targetScreen->handle());
NSRect frame = cocoaScreen->mapToNative(rect).toCGRect();
NSRect frame = NSRectFromCGRect(cocoaScreen->mapToNative(rect).toCGRect());
// Note: The macOS window manager has a bug, where if a screen is rotated, it will not allow
// a window to be created within the area of the screen that has a Y coordinate (I quadrant)