summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/plugins/platforms/cocoa/qcocoascreen.mm4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoascreen.mm b/src/plugins/platforms/cocoa/qcocoascreen.mm
index 5b6b2c13be..0d6567070e 100644
--- a/src/plugins/platforms/cocoa/qcocoascreen.mm
+++ b/src/plugins/platforms/cocoa/qcocoascreen.mm
@@ -474,8 +474,8 @@ QPixmap QCocoaScreen::grabWindow(WId window, int x, int y, int width, int height
// Calculate the position and size of the requested area
QPoint pos(qAbs(bounds.origin.x - x), qAbs(bounds.origin.y - y));
- QSize size(qMin(pos.x() + width, qRound(bounds.size.width)),
- qMin(pos.y() + height, qRound(bounds.size.height)));
+ QSize size(qMin(width, qRound(bounds.size.width)),
+ qMin(height, qRound(bounds.size.height)));
pos *= dpr;
size *= dpr;