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

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