diff options
author | Jake Petroules <jake.petroules@qt.io> | 2016-11-04 03:48:22 -0700 |
---|---|---|
committer | Tony Sarajärvi <tony.sarajarvi@qt.io> | 2016-11-04 21:23:09 +0000 |
commit | 825bb10d9bf40587828e4e589b199a9ffec255ce (patch) | |
tree | 4164442389ff7420387c5b032dc1ca0e0b86dcbe | |
parent | bc4f672cc6a3ab07a967dbb88e769e4869ec1fbc (diff) |
macOS: fix 32-bit builds
amends e39a436d0ca00fbcbef1428e32f74266c7a8d34d and
1ad6ae21f015ead3dcc4bed21a988f0d7d5d0d2d.
Change-Id: Ib5c0b516ea2e5ec8d89f3e2e9888ef3eb8de6de4
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoaintegration.mm | 4 | ||||
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoawindow.mm | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.mm b/src/plugins/platforms/cocoa/qcocoaintegration.mm index d48722b82f..7e9f554520 100644 --- a/src/plugins/platforms/cocoa/qcocoaintegration.mm +++ b/src/plugins/platforms/cocoa/qcocoaintegration.mm @@ -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 diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index dfaed9923e..30ac79f3a0 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -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) |