Do not update the mask if we do not have a surface
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>
This commit is contained in:
parent
80c336554d
commit
c4b1dbfc06
@ -478,15 +478,15 @@ void QWaylandWindow::lower()
|
|||||||
|
|
||||||
void QWaylandWindow::setMask(const QRegion &mask)
|
void QWaylandWindow::setMask(const QRegion &mask)
|
||||||
{
|
{
|
||||||
|
QReadLocker locker(&mSurfaceLock);
|
||||||
|
if (!mSurface)
|
||||||
|
return;
|
||||||
|
|
||||||
if (mMask == mask)
|
if (mMask == mask)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
mMask = mask;
|
mMask = mask;
|
||||||
|
|
||||||
QReadLocker locker(&mSurfaceLock);
|
|
||||||
if (!mSurface)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (mMask.isEmpty()) {
|
if (mMask.isEmpty()) {
|
||||||
mSurface->set_input_region(nullptr);
|
mSurface->set_input_region(nullptr);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user