Blame SOURCES/0016-Get-correct-decoration-margins-region.patch

f8c1a9
From 6810b0f66a34056bfe0da7299d7a768e700e58f5 Mon Sep 17 00:00:00 2001
2702c2
From: Jan Grulich <jgrulich@redhat.com>
2702c2
Date: Thu, 11 Feb 2021 15:12:32 +0100
f8c1a9
Subject: [PATCH 16/36] Get correct decoration margins region
2702c2
2702c2
Size we use to calculate margins region already contains size including
2702c2
margins. This resulted into bigger region and not properly damaging
2702c2
region we need to update.
2702c2
f8c1a9
Pick-to: 5.15 6.0 6.1
2702c2
Change-Id: Id1b7f4cd2a7b894b82db09c5af2b2d1f1f43fa2a
f8c1a9
Reviewed-by: David Edmundson <davidedmundson@kde.org>
2702c2
---
f8c1a9
 src/client/qwaylandabstractdecoration.cpp | 8 ++++----
f8c1a9
 1 file changed, 4 insertions(+), 4 deletions(-)
2702c2
2702c2
diff --git a/src/client/qwaylandabstractdecoration.cpp b/src/client/qwaylandabstractdecoration.cpp
f8c1a9
index 87dd6cea..b6ee43c9 100644
2702c2
--- a/src/client/qwaylandabstractdecoration.cpp
2702c2
+++ b/src/client/qwaylandabstractdecoration.cpp
f8c1a9
@@ -108,11 +108,11 @@ void QWaylandAbstractDecoration::setWaylandWindow(QWaylandWindow *window)
2702c2
 static QRegion marginsRegion(const QSize &size, const QMargins &margins)
2702c2
 {
2702c2
     QRegion r;
2702c2
-    const int widthWithMargins = margins.left() + size.width() + margins.right();
2702c2
-    r += QRect(0, 0, widthWithMargins, margins.top()); // top
2702c2
-    r += QRect(0, size.height()+margins.top(), widthWithMargins, margins.bottom()); //bottom
2702c2
+
2702c2
+    r += QRect(0, 0, size.width(), margins.top()); // top
2702c2
+    r += QRect(0, size.height()-margins.bottom(), size.width(), margins.bottom()); //bottom
2702c2
     r += QRect(0, margins.top(), margins.left(), size.height()); //left
2702c2
-    r += QRect(size.width()+margins.left(), margins.top(), margins.right(), size.height()); // right
2702c2
+    r += QRect(size.width()-margins.left(), margins.top(), margins.right(), size.height()-margins.top()); // right
2702c2
     return r;
2702c2
 }
2702c2
 
f8c1a9
-- 
f8c1a9
2.33.1
f8c1a9