core/window: fix mask reactivity

Masks previously would not update if the item was changed, and full
transparency was decided incorrectly.
This commit is contained in:
outfoxxed 2024-03-20 22:32:34 -07:00
parent 31264ac7d1
commit dd811ac423
Signed by untrusted user: outfoxxed
GPG key ID: 4C88A185FB89301E
2 changed files with 9 additions and 10 deletions

View file

@ -245,14 +245,9 @@ void ProxyWindowBase::updateMask() {
auto windowRegion = QRegion(QRect(0, 0, this->width(), this->height()));
mask = this->mMask->applyTo(windowRegion);
}
if (mask.isEmpty()) {
this->window->setFlag(Qt::WindowTransparentForInput, true);
}
} else {
this->window->setFlag(Qt::WindowTransparentForInput, false);
}
this->window->setFlag(Qt::WindowTransparentForInput, this->mMask != nullptr && mask.isEmpty());
this->window->setMask(mask);
}