mirror of
https://github.com/quickshell-mirror/quickshell.git
synced 2026-10-27 02:54:36 +00:00
window: changing screen now recreates the window on the new screen
This commit is contained in:
3 files changed
+10
-2
No files matched your search
@@ -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; }
|
||||
|
||||
@@ -28,6 +28,9 @@ public:
|
||||
/// See [Quickshell.screens] for an example of using `Variants` to create copies of a window per
|
||||
/// screen.
|
||||
///
|
||||
/// > [!WARNING] BUG: Variants currently fails to reload children if the variant set is changed as
|
||||
/// > it is instantiated. (usually due to a mutation during variant creation)
|
||||
///
|
||||
/// [Quickshell.screens]: ../quickshell#prop.screens
|
||||
class Variants: public Reloadable {
|
||||
Q_OBJECT;
|
||||
|
||||
Reference in new issue
Block a user