macOS: fix 32-bit builds
amendsbb10e39a436d0cand1ad6ae21f0. Change-Id: Ib5c0b516ea2e5ec8d89f3e2e9888ef3eb8de6de4 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
parent
bc4f672cc6
commit
825bb10d9b
|
|
@ -122,8 +122,8 @@ void QCocoaScreen::updateGeometry()
|
||||||
// At this point the geometry is in native coordinates, but the size
|
// 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
|
// is correct, which we take advantage of next when we map the native
|
||||||
// coordinates to the Qt coordinate system.
|
// coordinates to the Qt coordinate system.
|
||||||
m_geometry = QRectF::fromCGRect(m_nsScreen.frame).toRect();
|
m_geometry = QRectF::fromCGRect(NSRectToCGRect(m_nsScreen.frame)).toRect();
|
||||||
m_availableGeometry = QRectF::fromCGRect(m_nsScreen.visibleFrame).toRect();
|
m_availableGeometry = QRectF::fromCGRect(NSRectToCGRect(m_nsScreen.visibleFrame)).toRect();
|
||||||
|
|
||||||
// The reference screen for the geometry is always the primary screen, but since
|
// 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
|
// we may be in the process of creating and registering the primary screen, we
|
||||||
|
|
|
||||||
|
|
@ -1662,7 +1662,7 @@ QCocoaNSWindow *QCocoaWindow::createNSWindow(bool shouldBeChildNSWindow, bool sh
|
||||||
|
|
||||||
rect.translate(-targetScreen->geometry().topLeft());
|
rect.translate(-targetScreen->geometry().topLeft());
|
||||||
QCocoaScreen *cocoaScreen = static_cast<QCocoaScreen *>(targetScreen->handle());
|
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
|
// 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)
|
// a window to be created within the area of the screen that has a Y coordinate (I quadrant)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue