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 @@ -360,9 +360,6 @@ auto image = scene->backend()->buffer(); for (auto y = startPos.y(); y < startPos.y() + client->clientSize().height(); y++) { for (auto x = startPos.x(); x < startPos.x() + client->clientSize().width(); x++) { - if ((x >= 95 && y >= 41) || y >= 203) { - QEXPECT_FAIL("", "BUG 382748", Continue); - } QCOMPARE(image->pixel(x, y), qRgb(255, 255, 255)); } } 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