Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
5.11.2, 5.11.3, 5.12.0
-
None
-
-
34e03bf56cb080f3fae7dd31f0eb1d72e3bb518c (qt/qtwayland/5.12)
Description
const QImage &QWaylandAbstractDecoration::contentImage() { Q_D(QWaylandAbstractDecoration); if (d->m_isDirty) { //Update the decoration backingstore const int scale = waylandWindow()->scale(); const QSize imageSize = window()->frameGeometry().size() * scale; #ifdef Q_OS_SYLIXOS // This code should be optimized, it not only for porting SylixOS. if ((d->m_decorationContentImage.format() != QImage::Format_ARGB32_Premultiplied) || (d->m_decorationContentImage.size() != imageSize)) { d->m_decorationContentImage = QImage(imageSize, QImage::Format_ARGB32_Premultiplied); d->m_decorationContentImage.setDevicePixelRatio(scale); d->m_decorationContentImage.fill(Qt::transparent); this->paint(&d->m_decorationContentImage); // // Should the parameter here be like this? Not frameGeometry() but geometry()! QRegion damage = marginsRegion(window()->geometry().size(), window()->frameMargins()); for (QRect r : damage) waylandWindow()->damage(r); } #else d->m_decorationContentImage = QImage(imageSize, QImage::Format_ARGB32_Premultiplied); d->m_decorationContentImage.setDevicePixelRatio(scale); d->m_decorationContentImage.fill(Qt::transparent); this->paint(&d->m_decorationContentImage); QRegion damage = marginsRegion(window()->frameGeometry().size(), window()->frameMargins()); for (QRect r : damage) waylandWindow()->damage(r); #endif d->m_isDirty = false; } return d->m_decorationContentImage; }
file: /qt5/qtwayland/src/client/qwaylandabstractdecoration.cpp
describe: Whether the parameter of marginsRegion is should be the original size and margin!
---------------------------------------twice---------------------------------------------------
The latest code changed the calculation area to the wrong one.
// The first parameter should be geometry without margins.
QRegion damage = marginsRegion(waylandWindow()>surfaceSize(), waylandWindow()>frameMargins());
for (QRect r : damage)
waylandWindow()->damage(r);
Attachments
Issue Links
- resulted in
-
QTBUG-75377 Don't mark decorations as dirty when the buffer size doesn't change
-
- Closed
-