diff --git a/autotests/integration/scene_qpainter_test.cpp b/autotests/integration/scene_qpainter_test.cpp --- a/autotests/integration/scene_qpainter_test.cpp +++ b/autotests/integration/scene_qpainter_test.cpp @@ -372,7 +372,6 @@ const QPoint startPos = client->pos() + client->clientPos(); auto image = scene->backend()->buffer(); - QEXPECT_FAIL("", "BUG 382748", Continue); QCOMPARE(image->copy(QRect(startPos, client->clientSize())), compareImage); // and destroy the window again diff --git a/scene_qpainter.cpp b/scene_qpainter.cpp --- a/scene_qpainter.cpp +++ b/scene_qpainter.cpp @@ -310,7 +310,12 @@ // render content const QRect target = QRect(toplevel->clientPos(), toplevel->clientSize()); - const QRect src = QRect(toplevel->clientPos() + toplevel->clientContentPos(), pixmap->image().size()); + QSize srcSize = pixmap->image().size(); + if (pixmap->surface() && pixmap->surface()->scale() == 1 && srcSize != toplevel->clientSize()) { + // special case for XWayland windows + srcSize = toplevel->clientSize(); + } + const QRect src = QRect(toplevel->clientPos() + toplevel->clientContentPos(), srcSize); painter->drawImage(target, pixmap->image(), src); // render subsurfaces