qt5-qtwayland/0010-Do-not-update-the-mask-if-we-do-not-have-a-surface.patch

45 lines
1.3 KiB
Diff
Raw Normal View History

2022-05-17 08:02:19 +00:00
From c7022c1c0107781993b1d13e7aa11dd3f7486249 Mon Sep 17 00:00:00 2001
2022-03-08 11:00:00 +00:00
From: Aleix Pol <aleixpol@kde.org>
Date: Tue, 13 Jul 2021 13:32:15 +0200
2022-05-17 08:02:19 +00:00
Subject: [PATCH 10/38] Do not update the mask if we do not have a surface
2022-03-08 11:00:00 +00:00
mMask serves as a cache to remember what we've sent, the source of truth
for the value is window()->mask().
No need to store values that we are going to discard, because it will
confuse the state of newly created windows.
Change-Id: I6aa3da82c7f09c7ef90d0f7060f292fb042730f0
Pick-to: 5.15 6.2
Reviewed-by: David Edmundson <davidedmundson@kde.org>
(cherry picked from commit 962f87190c682562b369c5ebd93dc9ce0915ed7a)
---
src/client/qwaylandwindow.cpp | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
index e96d8fe9..bd70f4af 100644
--- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp
@@ -464,14 +464,15 @@ void QWaylandWindow::lower()
void QWaylandWindow::setMask(const QRegion &mask)
{
+ QReadLocker locker(&mSurfaceLock);
+ if (!mSurface)
+ return;
+
if (mMask == mask)
return;
mMask = mask;
- if (!mSurface)
- return;
-
if (mMask.isEmpty()) {
mSurface->set_input_region(nullptr);
--
2022-05-17 08:02:19 +00:00
2.36.1
2022-03-08 11:00:00 +00:00