summaryrefslogtreecommitdiffstats
path: root/src/client/qwaylandabstractdecoration.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/qwaylandabstractdecoration.cpp')
-rw-r--r--src/client/qwaylandabstractdecoration.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/client/qwaylandabstractdecoration.cpp b/src/client/qwaylandabstractdecoration.cpp
index 32fa6e1b5..0f00b9890 100644
--- a/src/client/qwaylandabstractdecoration.cpp
+++ b/src/client/qwaylandabstractdecoration.cpp
@@ -115,16 +115,17 @@ const QImage &QWaylandAbstractDecoration::contentImage()
{
Q_D(QWaylandAbstractDecoration);
if (d->m_isDirty) {
- //Update the decoration backingstore
+ // Update the decoration backingstore
- const int scale = waylandWindow()->scale();
- const QSize imageSize = window()->frameGeometry().size() * scale;
+ const int bufferScale = waylandWindow()->scale();
+ const QSize imageSize = waylandWindow()->surfaceSize() * bufferScale;
d->m_decorationContentImage = QImage(imageSize, QImage::Format_ARGB32_Premultiplied);
- d->m_decorationContentImage.setDevicePixelRatio(scale);
+ // Only scale by buffer scale, not QT_SCALE_FACTOR etc.
+ d->m_decorationContentImage.setDevicePixelRatio(bufferScale);
d->m_decorationContentImage.fill(Qt::transparent);
this->paint(&d->m_decorationContentImage);
- QRegion damage = marginsRegion(window()->geometry().size(), window()->frameMargins());
+ QRegion damage = marginsRegion(waylandWindow()->surfaceSize(), waylandWindow()->frameMargins());
for (QRect r : damage)
waylandWindow()->damage(r);