From 9ff4abfb4a2a76b2ed0f664876955a9ab3a5b726 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 1 Jun 2017 17:45:02 +0200 Subject: [PATCH] Adjust offset of native children according to device pixel ratio Otherwise the wrong background can be used. Task-number: QTBUG-59017 Change-Id: Iccbe9cd9704bccbceda4c8dafe87435b68b5cf3e --- src/gui/painting/qplatformbackingstore.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/painting/qplatformbackingstore.cpp b/src/gui/painting/qplatformbackingstore.cpp index b8bbdef..b88dd76 100644 --- a/src/gui/painting/qplatformbackingstore.cpp +++ b/src/gui/painting/qplatformbackingstore.cpp @@ -394,7 +394,7 @@ void QPlatformBackingStore::composeAndFlush(QWindow *window, const QRegion ®i d_ptr->blitter->setRedBlueSwizzle(true); // The backingstore is for the entire tlw. // In case of native children offset tells the position relative to the tlw. - const QRect srcRect = toBottomLeftRect(deviceWindowRect.translated(offset), d_ptr->textureSize.height()); + const QRect srcRect = toBottomLeftRect(deviceWindowRect.translated(offset * window->devicePixelRatio()), d_ptr->textureSize.height()); const QMatrix3x3 source = QOpenGLTextureBlitter::sourceTransform(srcRect, d_ptr->textureSize, origin); -- 2.7.4