forked from quickshell/quickshell
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:
parent
31264ac7d1
commit
dd811ac423
2 changed files with 9 additions and 10 deletions
|
@ -26,10 +26,14 @@ void PendingRegion::setItem(QQuickItem* item) {
|
|||
|
||||
this->mItem = item;
|
||||
|
||||
QObject::connect(this->mItem, &QQuickItem::xChanged, this, &PendingRegion::itemChanged);
|
||||
QObject::connect(this->mItem, &QQuickItem::yChanged, this, &PendingRegion::itemChanged);
|
||||
QObject::connect(this->mItem, &QQuickItem::widthChanged, this, &PendingRegion::itemChanged);
|
||||
QObject::connect(this->mItem, &QQuickItem::heightChanged, this, &PendingRegion::itemChanged);
|
||||
if (item != nullptr) {
|
||||
QObject::connect(this->mItem, &QQuickItem::xChanged, this, &PendingRegion::itemChanged);
|
||||
QObject::connect(this->mItem, &QQuickItem::yChanged, this, &PendingRegion::itemChanged);
|
||||
QObject::connect(this->mItem, &QQuickItem::widthChanged, this, &PendingRegion::itemChanged);
|
||||
QObject::connect(this->mItem, &QQuickItem::heightChanged, this, &PendingRegion::itemChanged);
|
||||
}
|
||||
|
||||
emit this->itemChanged();
|
||||
}
|
||||
|
||||
void PendingRegion::onItemDestroyed() { this->mItem = nullptr; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue