From 41803ee2355d081f446c335339060e4f060949cf Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Thu, 14 Mar 2024 04:48:27 -0700 Subject: [PATCH] core/window: fix windows not taking screen assignments during reload --- src/core/proxywindow.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/core/proxywindow.cpp b/src/core/proxywindow.cpp index 467addf..a0e260d 100644 --- a/src/core/proxywindow.cpp +++ b/src/core/proxywindow.cpp @@ -73,6 +73,13 @@ void ProxyWindowBase::setupWindow() { QObject::connect(this, &ProxyWindowBase::heightChanged, this, &ProxyWindowBase::onMaskChanged); // clang-format on + if (this->window->screen() != this->mScreen) { + auto reshow = this->window->isVisible(); + if (reshow) this->window->setVisible(false); + this->window->setScreen(this->mScreen); + if (reshow) this->window->setVisible(true); + } + this->window->setScreen(this->mScreen); this->setWidth(this->mWidth); this->setHeight(this->mHeight);