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

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