- Add more commits from KDE's 5.15 branch: * 0008-Fix-memory-leak-in-QWaylandGLContext.patch (QTBUG-85608) * 0009-Client-Send-set_window_geometry-only-once-configured.patch * 0010-Translate-opaque-area-with-frame-margins.patch * 0011-Client-Send-exposeEvent-to-parent-on-subsurface-posi.patch (QTBUG-86177) * 0012-Get-correct-decoration-margins-region.patch * 0013-xdgshell-Tell-the-compositor-the-screen-we-re-expect.patch * 0014-Fix-compilation.patch * 0015-client-Allow-QWaylandInputContext-to-accept-composed.patch (kde#405388) * 0016-Client-Announce-an-output-after-receiving-more-compl.patch (kde#435124) * 0017-Fix-issue-with-repeated-window-size-changes.patch * 0018-Include-locale.h-for-setlocale-LC_CTYPE.patch OBS-URL: https://build.opensuse.org/request/show/893496 OBS-URL: https://build.opensuse.org/package/show/KDE:Qt:5.15/libqt5-qtwayland?expand=0&rev=15
40 lines
1.7 KiB
Diff
40 lines
1.7 KiB
Diff
From 6810b0f66a34056bfe0da7299d7a768e700e58f5 Mon Sep 17 00:00:00 2001
|
|
From: Jan Grulich <jgrulich@redhat.com>
|
|
Date: Thu, 11 Feb 2021 15:12:32 +0100
|
|
Subject: [PATCH 12/18] Get correct decoration margins region
|
|
|
|
Size we use to calculate margins region already contains size including
|
|
margins. This resulted into bigger region and not properly damaging
|
|
region we need to update.
|
|
|
|
Pick-to: 5.15 6.0 6.1
|
|
Change-Id: Id1b7f4cd2a7b894b82db09c5af2b2d1f1f43fa2a
|
|
Reviewed-by: David Edmundson <davidedmundson@kde.org>
|
|
---
|
|
src/client/qwaylandabstractdecoration.cpp | 8 ++++----
|
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/src/client/qwaylandabstractdecoration.cpp b/src/client/qwaylandabstractdecoration.cpp
|
|
index 87dd6cea..b6ee43c9 100644
|
|
--- a/src/client/qwaylandabstractdecoration.cpp
|
|
+++ b/src/client/qwaylandabstractdecoration.cpp
|
|
@@ -108,11 +108,11 @@ void QWaylandAbstractDecoration::setWaylandWindow(QWaylandWindow *window)
|
|
static QRegion marginsRegion(const QSize &size, const QMargins &margins)
|
|
{
|
|
QRegion r;
|
|
- const int widthWithMargins = margins.left() + size.width() + margins.right();
|
|
- r += QRect(0, 0, widthWithMargins, margins.top()); // top
|
|
- r += QRect(0, size.height()+margins.top(), widthWithMargins, margins.bottom()); //bottom
|
|
+
|
|
+ r += QRect(0, 0, size.width(), margins.top()); // top
|
|
+ r += QRect(0, size.height()-margins.bottom(), size.width(), margins.bottom()); //bottom
|
|
r += QRect(0, margins.top(), margins.left(), size.height()); //left
|
|
- r += QRect(size.width()+margins.left(), margins.top(), margins.right(), size.height()); // right
|
|
+ r += QRect(size.width()-margins.left(), margins.top(), margins.right(), size.height()-margins.top()); // right
|
|
return r;
|
|
}
|
|
|
|
--
|
|
2.25.1
|
|
|