x11/panelwindow: fix multi monitor

Previously attached panels to the virtual desktop geometry instead of
the screen geometry.
This commit is contained in:
outfoxxed 2024-08-15 18:46:06 -07:00
parent 22c397bbb0
commit 815867c178
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E
3 changed files with 36 additions and 17 deletions

View file

@ -140,6 +140,8 @@ void ProxyWindowBase::completeWindow() {
if (this->mScreen != nullptr && this->window->screen() != this->mScreen) {
if (this->window->isVisible()) this->window->setVisible(false);
this->window->setScreen(this->mScreen);
} else if (this->mScreen == nullptr) {
this->mScreen = this->window->screen();
}
this->setWidth(this->mWidth);
@ -259,7 +261,6 @@ void ProxyWindowBase::setScreen(QuickshellScreenInfo* screen) {
}
if (this->window == nullptr) {
this->mScreen = qscreen;
emit this->screenChanged();
} else {
auto reshow = this->isVisibleDirect();
@ -267,6 +268,9 @@ void ProxyWindowBase::setScreen(QuickshellScreenInfo* screen) {
if (this->window != nullptr) this->window->setScreen(qscreen);
if (reshow) this->setVisibleDirect(true);
}
if (qscreen) this->mScreen = qscreen;
else this->mScreen = this->window->screen();
}
void ProxyWindowBase::onScreenDestroyed() { this->mScreen = nullptr; }