mirror of
https://git.outfoxxed.me/quickshell/quickshell.git
synced 2026-02-25 03:43:58 +11:00
core/proxywindow: expose updatesEnabled property
This commit is contained in:
parent
a99519c3ad
commit
2cf57f43d5
4 changed files with 34 additions and 0 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue