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

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