diff options
Diffstat (limited to 'src/gui/image/qpixmap_mac.cpp')
-rwxr-xr-x | src/gui/image/qpixmap_mac.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/image/qpixmap_mac.cpp b/src/gui/image/qpixmap_mac.cpp index 5923e24..83d6a60 100755 --- a/src/gui/image/qpixmap_mac.cpp +++ b/src/gui/image/qpixmap_mac.cpp @@ -890,9 +890,12 @@ static QPixmap qt_mac_grabScreenRect_10_6(const QRect &rect) const CGRect cgRect = CGRectMake(rect.x(), rect.y(), rect.width(), rect.height()); const CGDisplayErr err = CGGetDisplaysWithRect(cgRect, maxDisplays, displays, &displayCount); + extern CGFloat qt_mac_get_scalefactor(); + QRect scaledRect = QRect(rect.topLeft(), rect.size() * qt_mac_get_scalefactor()); + if (err && displayCount == 0) return QPixmap(); - QPixmap windowPixmap(rect.size()); + QPixmap windowPixmap(scaledRect.size()); for (uint i = 0; i < displayCount; ++i) { const CGRect bounds = CGDisplayBounds(displays[i]); // Translate to display-local coordinates |