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

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