feat: add layershell support

This commit is contained in:
outfoxxed 2024-02-04 04:58:58 -08:00
parent 56502b79f6
commit d76100781f
Signed by untrusted user: outfoxxed
GPG key ID: 4C88A185FB89301E
12 changed files with 677 additions and 11 deletions

View file

@ -20,9 +20,17 @@ void ProxyWindowBase::earlyInit(QObject* old) {
} else {
this->window = oldpw->disownWindow();
}
// clang-format off
QObject::connect(this->window, &QWindow::visibilityChanged, this, &ProxyWindowBase::visibleChanged);
QObject::connect(this->window, &QWindow::widthChanged, this, &ProxyWindowBase::widthChanged);
QObject::connect(this->window, &QWindow::heightChanged, this, &ProxyWindowBase::heightChanged);
// clang-format on
}
QQuickWindow* ProxyWindowBase::disownWindow() {
QObject::disconnect(this->window, nullptr, this, nullptr);
auto data = this->data();
ProxyWindowBase::dataClear(&data);
data.clear(&data);