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

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