core/proxywindow: expose updatesEnabled property

This commit is contained in:
bbedward 2026-02-19 12:14:36 -05:00 committed by outfoxxed
parent a99519c3ad
commit 2cf57f43d5
No known key found for this signature in database
GPG key ID: 4C88A185FB89301E
4 changed files with 34 additions and 0 deletions

View file

@ -223,6 +223,7 @@ void ProxyWindowBase::completeWindow() {
this->trySetHeight(this->implicitHeight());
this->setColor(this->mColor);
this->updateMask();
QQuickWindowPrivate::get(this->window)->updatesEnabled = this->mUpdatesEnabled;
// notify initial / post-connection geometry
emit this->xChanged();
@ -479,6 +480,19 @@ void ProxyWindowBase::setSurfaceFormat(QsSurfaceFormat format) {
emit this->surfaceFormatChanged();
}
bool ProxyWindowBase::updatesEnabled() const { return this->mUpdatesEnabled; }
void ProxyWindowBase::setUpdatesEnabled(bool updatesEnabled) {
if (updatesEnabled == this->mUpdatesEnabled) return;
this->mUpdatesEnabled = updatesEnabled;
if (this->window != nullptr) {
QQuickWindowPrivate::get(this->window)->updatesEnabled = updatesEnabled;
}
emit this->updatesEnabledChanged();
}
qreal ProxyWindowBase::devicePixelRatio() const {
if (this->window != nullptr) return this->window->devicePixelRatio();
if (this->mScreen != nullptr) return this->mScreen->devicePixelRatio();