core/window: fix windows not taking screen assignments during reload

This commit is contained in:
outfoxxed 2024-03-14 04:48:27 -07:00
parent 48156a55b3
commit 41803ee235
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E

View file

@ -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);