diff --git a/src/effects/screenshot/screenshot.cpp b/src/effects/screenshot/screenshot.cpp index c07502c388..f724a7d4e9 100644 --- a/src/effects/screenshot/screenshot.cpp +++ b/src/effects/screenshot/screenshot.cpp @@ -257,7 +257,7 @@ void ScreenShotEffect::takeScreenShot(ScreenShotWindowData *screenshot) glClearColor(0.0, 0.0, 0.0, 1.0); QMatrix4x4 projection; - projection.ortho(QRect(0, 0, geometry.width(), geometry.height())); + projection.ortho(QRect(0, 0, geometry.width() * devicePixelRatio, geometry.height() * devicePixelRatio)); d.setProjectionMatrix(projection); effects->drawWindow(window, mask, infiniteRegion(), d); @@ -358,7 +358,7 @@ QImage ScreenShotEffect::blitScreenshot(const QRect &geometry, qreal devicePixel image = QImage(nativeSize.width(), nativeSize.height(), QImage::Format_ARGB32); GLTexture texture(GL_RGBA8, nativeSize.width(), nativeSize.height()); GLFramebuffer target(&texture); - target.blitFromFramebuffer(effects->mapToRenderTarget(geometry)); + target.blitFromFramebuffer(effects->mapToRenderTarget(QRectF(geometry)).toRect()); // copy content from framebuffer into image texture.bind(); glGetTexImage(GL_TEXTURE_2D, 0, GL_RGBA, GL_UNSIGNED_BYTE,