window: changing screen now recreates the window on the new screen

This commit is contained in:
outfoxxed committed 2024-03-09 05:06:49 -08:00
1 parent 31365dd179
commit 5f9bb9b46c
3 files changed
+10 -2

No files matched your search

+6 -1
View File
@@ -139,7 +139,12 @@ void ProxyWindowBase::setScreen(QuickshellScreenInfo* screen) {
if (this->window == nullptr) {
this->mScreen = qscreen;
emit this->screenChanged();
} else this->window->setScreen(qscreen);
} else {
auto reshow = this->window->isVisible();
if (reshow) this->window->setVisible(false);
this->window->setScreen(qscreen);
if (reshow) this->window->setVisible(true);
}
}
void ProxyWindowBase::onScreenDestroyed() { this->mScreen = nullptr; }