forked from quickshell/quickshell
debug/lint: run lints on reload for visible windows
This commit is contained in:
parent
8d63006bba
commit
a8901fde67
2 changed files with 7 additions and 4 deletions
|
@ -76,7 +76,10 @@ void ProxyWindowBase::onReload(QObject* oldInstance) {
|
||||||
emit this->windowConnected();
|
emit this->windowConnected();
|
||||||
this->postCompleteWindow();
|
this->postCompleteWindow();
|
||||||
|
|
||||||
if (wasVisible && this->isVisibleDirect()) emit this->backerVisibilityChanged();
|
if (wasVisible && this->isVisibleDirect()) {
|
||||||
|
emit this->backerVisibilityChanged();
|
||||||
|
this->runLints();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProxyWindowBase::postCompleteWindow() { this->setVisible(this->mVisible); }
|
void ProxyWindowBase::postCompleteWindow() { this->setVisible(this->mVisible); }
|
||||||
|
@ -137,7 +140,7 @@ void ProxyWindowBase::connectWindow() {
|
||||||
QObject::connect(this->window, &QWindow::heightChanged, this, &ProxyWindowBase::heightChanged);
|
QObject::connect(this->window, &QWindow::heightChanged, this, &ProxyWindowBase::heightChanged);
|
||||||
QObject::connect(this->window, &QWindow::screenChanged, this, &ProxyWindowBase::screenChanged);
|
QObject::connect(this->window, &QWindow::screenChanged, this, &ProxyWindowBase::screenChanged);
|
||||||
QObject::connect(this->window, &QQuickWindow::colorChanged, this, &ProxyWindowBase::colorChanged);
|
QObject::connect(this->window, &QQuickWindow::colorChanged, this, &ProxyWindowBase::colorChanged);
|
||||||
QObject::connect(this->window, &ProxiedWindow::exposed, this, &ProxyWindowBase::onWindowExposeEvent);
|
QObject::connect(this->window, &ProxiedWindow::exposed, this, &ProxyWindowBase::runLints);
|
||||||
// clang-format on
|
// clang-format on
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -221,7 +224,7 @@ void ProxyWindowBase::polishItems() {
|
||||||
QQuickWindowPrivate::get(this->window)->polishItems();
|
QQuickWindowPrivate::get(this->window)->polishItems();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProxyWindowBase::onWindowExposeEvent() {
|
void ProxyWindowBase::runLints() {
|
||||||
if (!this->ranLints) {
|
if (!this->ranLints) {
|
||||||
qs::debug::lintItemTree(this->mContentItem);
|
qs::debug::lintItemTree(this->mContentItem);
|
||||||
this->ranLints = true;
|
this->ranLints = true;
|
||||||
|
|
|
@ -122,7 +122,7 @@ protected slots:
|
||||||
void onMaskChanged();
|
void onMaskChanged();
|
||||||
void onMaskDestroyed();
|
void onMaskDestroyed();
|
||||||
void onScreenDestroyed();
|
void onScreenDestroyed();
|
||||||
void onWindowExposeEvent();
|
void runLints();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool mVisible = true;
|
bool mVisible = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue