summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qdesktopwidget_mac.mm
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qdesktopwidget_mac.mm')
-rw-r--r--src/gui/kernel/qdesktopwidget_mac.mm13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/gui/kernel/qdesktopwidget_mac.mm b/src/gui/kernel/qdesktopwidget_mac.mm
index 88dc173..c2d05d7 100644
--- a/src/gui/kernel/qdesktopwidget_mac.mm
+++ b/src/gui/kernel/qdesktopwidget_mac.mm
@@ -136,16 +136,19 @@ void QDesktopWidgetImplementation::onResize()
screenRects.clear();
availableRects.clear();
NSRect primaryRect = [[displays objectAtIndex:0] frame];
- for (int i = 0; i<screenCount; i++) {
- NSRect r = [[displays objectAtIndex:i] frame];
- const int flippedY = - r.origin.y + // account for position offset and
+ for (int i = 0; i<screenCount; i++) {
+ 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));
- r = [[displays objectAtIndex:i] visibleFrame];
+
+ 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));
- }
+ }
}