Skip to content

Commit 478aa2b

Browse files
committed
core/window: run polish in onExposed instead of polishItems
Fixes hyprland visible regions created before window expose.
1 parent cee1f58 commit 478aa2b

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/window/proxywindow.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ void ProxyWindowBase::onReload(QObject* oldInstance) {
8585

8686
if (wasVisible && this->isVisibleDirect()) {
8787
emit this->backerVisibilityChanged();
88-
this->runLints();
88+
this->onExposed();
8989
}
9090
}
9191

@@ -195,7 +195,7 @@ void ProxyWindowBase::connectWindow() {
195195
QObject::connect(this->window, &QWindow::heightChanged, this, &ProxyWindowBase::heightChanged);
196196
QObject::connect(this->window, &QWindow::screenChanged, this, &ProxyWindowBase::screenChanged);
197197
QObject::connect(this->window, &QQuickWindow::colorChanged, this, &ProxyWindowBase::colorChanged);
198-
QObject::connect(this->window, &ProxiedWindow::exposed, this, &ProxyWindowBase::runLints);
198+
QObject::connect(this->window, &ProxiedWindow::exposed, this, &ProxyWindowBase::onExposed);
199199
QObject::connect(this->window, &ProxiedWindow::devicePixelRatioChanged, this, &ProxyWindowBase::devicePixelRatioChanged);
200200
// clang-format on
201201
}
@@ -283,10 +283,11 @@ void ProxyWindowBase::polishItems() {
283283
// This hack manually polishes the item tree right before showing the window so it will
284284
// always be created with the correct size.
285285
QQuickWindowPrivate::get(this->window)->polishItems();
286-
this->onPolished();
287286
}
288287

289-
void ProxyWindowBase::runLints() {
288+
void ProxyWindowBase::onExposed() {
289+
this->onPolished();
290+
290291
if (!this->ranLints) {
291292
qs::debug::lintItemTree(this->mContentItem);
292293
this->ranLints = true;

src/window/proxywindow.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ protected slots:
166166
void onMaskDestroyed();
167167
void onScreenDestroyed();
168168
virtual void onPolished();
169-
void runLints();
169+
void onExposed();
170170

171171
protected:
172172
bool mVisible = true;

0 commit comments

Comments
 (0)