core/window: add windowTransform and backingWindowVisible properties

This commit is contained in:
outfoxxed 2024-03-27 01:37:45 -07:00
parent 3a0381dcbe
commit 055b191a67
Signed by untrusted user: outfoxxed
GPG key ID: 4C88A185FB89301E
7 changed files with 42 additions and 3 deletions

View file

@ -30,6 +30,12 @@ ProxyWindowBase::ProxyWindowBase(QObject* parent)
QObject::connect(this, &ProxyWindowBase::maskChanged, this, &ProxyWindowBase::onMaskChanged);
QObject::connect(this, &ProxyWindowBase::widthChanged, this, &ProxyWindowBase::onMaskChanged);
QObject::connect(this, &ProxyWindowBase::heightChanged, this, &ProxyWindowBase::onMaskChanged);
QObject::connect(this, &ProxyWindowBase::xChanged, this, &ProxyWindowBase::windowTransformChanged);
QObject::connect(this, &ProxyWindowBase::yChanged, this, &ProxyWindowBase::windowTransformChanged);
QObject::connect(this, &ProxyWindowBase::widthChanged, this, &ProxyWindowBase::windowTransformChanged);
QObject::connect(this, &ProxyWindowBase::heightChanged, this, &ProxyWindowBase::windowTransformChanged);
QObject::connect(this, &ProxyWindowBase::backerVisibilityChanged, this, &ProxyWindowBase::windowTransformChanged);
// clang-format on
}
@ -171,14 +177,15 @@ void ProxyWindowBase::setVisibleDirect(bool visible) {
emit this->backerVisibilityChanged();
} else {
if (this->window != nullptr) {
this->window->setVisible(false);
emit this->backerVisibilityChanged();
this->window->setVisible(false);
this->deleteWindow();
}
}
} else if (this->window != nullptr) {
if (!visible) emit this->backerVisibilityChanged();
this->window->setVisible(visible);
emit this->backerVisibilityChanged();
if (visible) emit this->backerVisibilityChanged();
}
}