diff --git a/src/plugins/desktop/ddplugin-wallpapersetting/wallpapersettings.cpp b/src/plugins/desktop/ddplugin-wallpapersetting/wallpapersettings.cpp index d5665ac724..08f8e42128 100644 --- a/src/plugins/desktop/ddplugin-wallpapersetting/wallpapersettings.cpp +++ b/src/plugins/desktop/ddplugin-wallpapersetting/wallpapersettings.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #ifdef COMPILE_ON_V23 # define APPEARANCE_SERVICE "org.deepin.dde.Appearance1" @@ -1131,11 +1132,17 @@ void WallpaperSettings::applyToDesktop() fmDebug() << "dbus Appearance SetMonitorBackground is called " << d->screenName << " " << d->currentSelectedWallpaper; QList argumentList; - argumentList << QVariant::fromValue(d->screenName) << QVariant::fromValue(d->currentSelectedWallpaper); - d->appearanceIfs->asyncCallWithArgumentList(QStringLiteral("SetMonitorBackground"), argumentList); - fmDebug() << "dbus Appearance SetMonitorBackground end"; + QList allScreensList=QApplication::screens(); + if(allScreensList.size()){ + for (QScreen*tmp :allScreensList) { + argumentList << QVariant::fromValue(tmp->name()) << QVariant::fromValue(d->currentSelectedWallpaper); + d->appearanceIfs->asyncCallWithArgumentList(QStringLiteral("SetMonitorBackground"), argumentList); + fmDebug() << "dbus Appearance SetMonitorBackground end"; + + emit backgroundChanged(); + } + } - emit backgroundChanged(); } void WallpaperSettings::applyToGreeter()