Blame SOURCES/0016-Do-not-update-the-mask-if-we-do-not-have-a-surface.patch

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