From 03f44ef7be7813af49dc9c2203acdcca033768e6 Mon Sep 17 00:00:00 2001 From: reionwong Date: Tue, 29 Mar 2022 23:02:29 +0800 Subject: [PATCH] fix: main screen switching --- desktop/desktopview.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/desktop/desktopview.cpp b/desktop/desktopview.cpp index 8150549..83a1456 100644 --- a/desktop/desktopview.cpp +++ b/desktop/desktopview.cpp @@ -66,6 +66,8 @@ void DesktopView::onPrimaryScreenChanged(QScreen *screen) { bool isPrimaryScreen = m_screen->name() == screen->name(); + onGeometryChanged(); + setSource(isPrimaryScreen ? QStringLiteral("qrc:/qml/Desktop/Main.qml") : QStringLiteral("qrc:/qml/Desktop/Wallpaper.qml")); }