x11/panelwindow: fix multi monitor
Previously attached panels to the virtual desktop geometry instead of the screen geometry.
This commit is contained in:
parent
22c397bbb0
commit
815867c178
3 changed files with 36 additions and 17 deletions
|
@ -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; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue