fix: main screen switching

This commit is contained in:
reionwong 2022-03-29 23:02:29 +08:00
parent 561b1ce0ac
commit 03f44ef7be

View file

@ -66,6 +66,8 @@ void DesktopView::onPrimaryScreenChanged(QScreen *screen)
{ {
bool isPrimaryScreen = m_screen->name() == screen->name(); bool isPrimaryScreen = m_screen->name() == screen->name();
onGeometryChanged();
setSource(isPrimaryScreen ? QStringLiteral("qrc:/qml/Desktop/Main.qml") setSource(isPrimaryScreen ? QStringLiteral("qrc:/qml/Desktop/Main.qml")
: QStringLiteral("qrc:/qml/Desktop/Wallpaper.qml")); : QStringLiteral("qrc:/qml/Desktop/Wallpaper.qml"));
} }