Skip to content

Commit e3971f8

Browse files
mhduiydeepin-bot[bot]
authored andcommitted
fix(personalization): reset wallpaper state per backend
1. Move wallpaper selection reset into backend background handlers. 2. Allow derived workers to access the wallpaper provider directly. 3. Keep monitor wallpaper setup behavior consistent across X11 and Treeland. Log: Reset pending wallpaper state in each personalization backend before applying monitor backgrounds. fix(personalization): 按后端重置壁纸状态 1. 将壁纸选择状态重置移动到后端背景设置处理中。 2. 允许派生工作类直接访问壁纸提供器。 3. 保持 X11 和 Treeland 的显示器壁纸设置行为一致。 Log: 在各个个性化后端应用显示器背景前重置待设置壁纸状态。 PMS: TASK-392001
1 parent be23d06 commit e3971f8

5 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/plugin-personalization/operation/personalizationworker.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,6 @@ void PersonalizationWorker::setWallpaperForMonitor(const QString &screenName, Wa
732732
if (wallpaper.isNull()) {
733733
return;
734734
}
735-
m_wallpaperWorker->setWantToSetWallpaper(nullptr);
736735
PersonalizationExport::WallpaperSetType setType;
737736
if (wallpaper->type == WallpaperEnums::Wallpaper_Live) {
738737
setType = PersonalizationExport::WallpaperSetType::Type_Video;

src/plugin-personalization/operation/personalizationworker.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ private Q_SLOTS:
117117
protected:
118118
PersonalizationModel *m_model;
119119
PersonalizationDBusProxy *m_personalizationDBusProxy;
120+
WallpaperProvider *m_wallpaperWorker = nullptr;
120121

121122
private:
122-
WallpaperProvider *m_wallpaperWorker = nullptr;
123123
ScreensaverProvider *m_screenSaverProvider = nullptr;
124124
Dtk::Core::DConfig *m_personalizationConfig = nullptr;
125125
Dtk::Core::DConfig *m_dtkConfig = nullptr;

src/plugin-personalization/operation/treelandworker.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ void TreeLandWorker::setWallpaperForMonitor(const QString &screen, const QString
7878

7979
void TreeLandWorker::setBackgroundForMonitor(const QString &monitorName, const QString &url, PersonalizationExport::WallpaperSetType type)
8080
{
81+
m_wallpaperWorker->setWantToSetWallpaper(nullptr);
8182
setWallpaper(monitorName, url, WallpaperContext::wallpaper_role_desktop, type);
8283
}
8384

src/plugin-personalization/operation/x11worker.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ void X11Worker::setBackgroundForMonitor(const QString &screenName, const QString
151151
{
152152
Q_UNUSED(type)
153153
qCDebug(DdcPersonnalizationX11Worker) << "setMonitorBackground " << screenName << url;
154+
m_wallpaperWorker->setWantToSetWallpaper(nullptr);
154155
if (screenName.isEmpty() || url.isEmpty())
155156
return;
156157

src/plugin-personalization/qml/WallpaperPage.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ DccObject {
138138
Layout.preferredWidth: 14
139139
Layout.preferredHeight: 14
140140
progress: dccData.model.wantToSetWallpaperProgress
141-
visible: dccData.model.wantToSetWallpaperStatus === WallpaperEnums.Download_Installing
141+
visible: dccData.model.wantToSetWallpaper && dccData.model.wantToSetWallpaperStatus === WallpaperEnums.Download_Installing
142142
}
143143
}
144144
}

0 commit comments

Comments
 (0)