mirror of
https://github.com/quickshell-mirror/quickshell.git
synced 2026-10-27 02:54:36 +00:00
core/window: ensure window cannot be made visible during reload
This causes duplicate windows.
This commit is contained in:
2 files changed
+4
-1
No files matched your search
@@ -51,6 +51,8 @@ void ProxyWindowBase::onReload(QObject* oldInstance) {
|
||||
this->connectWindow();
|
||||
this->completeWindow();
|
||||
|
||||
this->reloadComplete = true;
|
||||
|
||||
emit this->windowConnected();
|
||||
this->postCompleteWindow();
|
||||
|
||||
@@ -164,7 +166,7 @@ bool ProxyWindowBase::isVisibleDirect() const {
|
||||
|
||||
void ProxyWindowBase::setVisible(bool visible) {
|
||||
this->mVisible = visible;
|
||||
this->setVisibleDirect(visible);
|
||||
if (this->reloadComplete) this->setVisibleDirect(visible);
|
||||
}
|
||||
|
||||
void ProxyWindowBase::setVisibleDirect(bool visible) {
|
||||
|
||||
@@ -129,6 +129,7 @@ protected:
|
||||
PendingRegion* mMask = nullptr;
|
||||
QQuickWindow* window = nullptr;
|
||||
QQuickItem* mContentItem = nullptr;
|
||||
bool reloadComplete = false;
|
||||
|
||||
private:
|
||||
void updateMask();
|
||||
|
||||
Reference in new issue
Block a user