diff --git a/scene_qpainter.cpp b/scene_qpainter.cpp index feccf6223d..096b1e7126 100644 --- a/scene_qpainter.cpp +++ b/scene_qpainter.cpp @@ -308,8 +308,9 @@ void SceneQPainter::Window::performPaint(int mask, QRegion region, WindowPaintDa renderWindowDecorations(painter); // render content - const QRect src = QRect(toplevel->clientPos() + toplevel->clientContentPos(), toplevel->clientSize()); - painter->drawImage(toplevel->clientPos(), pixmap->image(), src); + const QRect target = QRect(toplevel->clientPos(), toplevel->clientSize()); + const QRect src = QRect(toplevel->clientPos() + toplevel->clientContentPos(), pixmap->image().size()); + painter->drawImage(target, pixmap->image(), src); // render subsurfaces const auto &children = pixmap->children(); diff --git a/shell_client.cpp b/shell_client.cpp index c4322f1488..c0698f144c 100644 --- a/shell_client.cpp +++ b/shell_client.cpp @@ -189,7 +189,7 @@ void ShellClient::init() setupWindowManagementInterface(); } m_unmapped = false; - m_clientSize = s->buffer()->size(); + m_clientSize = s->size(); } else { ready_for_painting = false; } @@ -207,7 +207,7 @@ void ShellClient::init() connect(s, &SurfaceInterface::sizeChanged, this, [this] { - m_clientSize = surface()->buffer()->size(); + m_clientSize = surface()->size(); doSetGeometry(QRect(geom.topLeft(), m_clientSize + QSize(borderLeft() + borderRight(), borderTop() + borderBottom()))); } ); @@ -375,8 +375,8 @@ void ShellClient::setOpacity(double opacity) void ShellClient::addDamage(const QRegion &damage) { auto s = surface(); - if (s->buffer()->size().isValid()) { - m_clientSize = s->buffer()->size(); + if (s->size().isValid()) { + m_clientSize = s->size(); QPoint position = geom.topLeft(); if (m_positionAfterResize.isValid()) { addLayerRepaint(geometry()); @@ -397,8 +397,11 @@ void ShellClient::setInternalFramebufferObject(const QSharedPointersize(); + markAsMapped(); doSetGeometry(QRect(geom.topLeft(), m_clientSize)); Toplevel::setInternalFramebufferObject(fbo); Toplevel::addDamage(QRegion(0, 0, width(), height()));