summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2019-01-02 15:04:23 +0100
committerJohan Helsing <johan.helsing@qt.io>2019-01-03 09:04:20 +0000
commit34e03bf56cb080f3fae7dd31f0eb1d72e3bb518c (patch)
tree7840e231bf5e85f993725cb2d7ea4f842763e849
parent00c0bad3184e32ff0b1dd799b7ef121eaa737c0d (diff)
Client: Fix incorrect damage for decoration edges
[ChangeLog][QPA plugin] Fixed a bug where surface damage for window decorations was outside the surface. Fixes: QTBUG-72818 Change-Id: I32d00174f1c308952a98bdb55731eb77be54f331 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
-rw-r--r--src/client/qwaylandabstractdecoration.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/qwaylandabstractdecoration.cpp b/src/client/qwaylandabstractdecoration.cpp
index 479a8575..6a8f1d92 100644
--- a/src/client/qwaylandabstractdecoration.cpp
+++ b/src/client/qwaylandabstractdecoration.cpp
@@ -100,6 +100,7 @@ void QWaylandAbstractDecoration::setWaylandWindow(QWaylandWindow *window)
d->m_wayland_window = window;
}
+// \a size is without margins
static QRegion marginsRegion(const QSize &size, const QMargins &margins)
{
QRegion r;
@@ -123,7 +124,7 @@ const QImage &QWaylandAbstractDecoration::contentImage()
d->m_decorationContentImage.fill(Qt::transparent);
this->paint(&d->m_decorationContentImage);
- QRegion damage = marginsRegion(window()->frameGeometry().size(), window()->frameMargins());
+ QRegion damage = marginsRegion(window()->geometry().size(), window()->frameMargins());
for (QRect r : damage)
waylandWindow()->damage(r);