core/window: add windowTransform and backingWindowVisible properties

This commit is contained in:
outfoxxed committed 2024-03-27 01:37:45 -07:00
1 parent 3a0381dcbe
commit 055b191a67
7 files changed
+42 -3

No files matched your search

+9 -2
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();
}
}