|
|
f8c1a9 |
From a3e3ac1c86a956b25b1dc24f14518b6e6c96bcfc Mon Sep 17 00:00:00 2001
|
|
|
2702c2 |
From: Jan Grulich <jgrulich@redhat.com>
|
|
|
2702c2 |
Date: Wed, 10 Feb 2021 17:11:27 +0100
|
|
|
f8c1a9 |
Subject: [PATCH 14/36] Translate opaque area with frame margins
|
|
|
2702c2 |
|
|
|
2702c2 |
The opaque area doesn't take window decorations into account, which may
|
|
|
2702c2 |
result into possible graphical artefacts.
|
|
|
2702c2 |
|
|
|
f8c1a9 |
Pick-to: 5.15 6.0 6.1
|
|
|
2702c2 |
Change-Id: I1606e8256e7e204dad927931eb1221b576e227fd
|
|
|
f8c1a9 |
Reviewed-by: David Edmundson <davidedmundson@kde.org>
|
|
|
2702c2 |
---
|
|
|
f8c1a9 |
src/client/qwaylandwindow.cpp | 8 +++++---
|
|
|
f8c1a9 |
1 file changed, 5 insertions(+), 3 deletions(-)
|
|
|
2702c2 |
|
|
|
2702c2 |
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
|
|
|
f8c1a9 |
index e875af3a..2af39977 100644
|
|
|
2702c2 |
--- a/src/client/qwaylandwindow.cpp
|
|
|
2702c2 |
+++ b/src/client/qwaylandwindow.cpp
|
|
|
f8c1a9 |
@@ -1234,12 +1234,14 @@ bool QWaylandWindow::isOpaque() const
|
|
|
2702c2 |
|
|
|
2702c2 |
void QWaylandWindow::setOpaqueArea(const QRegion &opaqueArea)
|
|
|
2702c2 |
{
|
|
|
2702c2 |
- if (opaqueArea == mOpaqueArea || !mSurface)
|
|
|
2702c2 |
+ const QRegion translatedOpaqueArea = opaqueArea.translated(frameMargins().left(), frameMargins().top());
|
|
|
2702c2 |
+
|
|
|
2702c2 |
+ if (translatedOpaqueArea == mOpaqueArea || !mSurface)
|
|
|
2702c2 |
return;
|
|
|
2702c2 |
|
|
|
2702c2 |
- mOpaqueArea = opaqueArea;
|
|
|
2702c2 |
+ mOpaqueArea = translatedOpaqueArea;
|
|
|
2702c2 |
|
|
|
2702c2 |
- struct ::wl_region *region = mDisplay->createRegion(opaqueArea);
|
|
|
2702c2 |
+ struct ::wl_region *region = mDisplay->createRegion(translatedOpaqueArea);
|
|
|
2702c2 |
mSurface->set_opaque_region(region);
|
|
|
2702c2 |
wl_region_destroy(region);
|
|
|
2702c2 |
}
|
|
|
f8c1a9 |
--
|
|
|
f8c1a9 |
2.33.1
|
|
|
f8c1a9 |
|