diff options
-rw-r--r-- | src/gui/kernel/qdesktopwidget_mac.mm | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/gui/kernel/qdesktopwidget_mac.mm b/src/gui/kernel/qdesktopwidget_mac.mm index 1020435..c2d05d7 100644 --- a/src/gui/kernel/qdesktopwidget_mac.mm +++ b/src/gui/kernel/qdesktopwidget_mac.mm @@ -137,15 +137,14 @@ void QDesktopWidgetImplementation::onResize() availableRects.clear(); NSRect primaryRect = [[displays objectAtIndex:0] frame]; for (int i = 0; i<screenCount; i++) { - const NSRect r = [[displays objectAtIndex:i] frame]; - const int flippedY = - r.origin.y + // account for position offset and + NSRect r = [[displays objectAtIndex:i] frame]; + int flippedY = - r.origin.y + // account for position offset and primaryRect.size.height - r.size.height; // height difference. screenRects.append(QRectF(r.origin.x, flippedY, r.size.width, r.size.height)); - } - for (int i = 0; i<screenCount; i++) { - const NSRect r = [[displays objectAtIndex:i] visibleFrame]; - const int flippedY = - r.origin.y + // account for position offset and + + r = [[displays objectAtIndex:i] visibleFrame]; + flippedY = - r.origin.y + // account for position offset and primaryRect.size.height - r.size.height; // height difference. availableRects.append(QRectF(r.origin.x, flippedY, r.size.width, r.size.height)); |