core/window: fix floating window reloading recreating the window

This commit is contained in:
outfoxxed 2024-03-16 02:49:41 -07:00
parent 300c0d97fb
commit 8d742e315e
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E

View file

@ -73,7 +73,7 @@ void ProxyWindowBase::setupWindow() {
QObject::connect(this, &ProxyWindowBase::heightChanged, this, &ProxyWindowBase::onMaskChanged);
// clang-format on
if (this->window->screen() != this->mScreen) {
if (this->mScreen != nullptr && this->window->screen() != this->mScreen) {
if (this->window->isVisible()) this->window->setVisible(false);
this->window->setScreen(this->mScreen);
}