feat: add SystemDConfigManager for dconfig init#1096
Open
deepin-wm wants to merge 1 commit into
Open
Conversation
1. Add SystemDConfigManager to own and initialize system-level dconfig 2. Block on global config initialization before business logic runs 3. Expose isInitializeSucceeded() and initializeSucceed signal 4. Route wallpaper manager through Helper::config() accessor 5. Remove dead #if block for dconfig version checks Log: System-level dconfig now blocks until ready before startup Influence: 1. Verify treeland starts normally when dconfig service is running 2. Verify default values apply when dconfig init fails or times out 3. Verify user config reloads correctly on user switch 4. Verify greeter session does not block on user config feat: 新增 SystemDConfigManager 管理系统级 dconfig 初始化 1. 新增 SystemDConfigManager 统一持有并初始化系统级 dconfig 2. 在业务逻辑执行前阻塞等待全局配置初始化完成 3. 提供 isInitializeSucceeded() 函数和 initializeSucceed 信号 4. 壁纸管理器改用 Helper::config() 访问器 5. 移除冗余的 dconfig 版本判断空块 Log: 系统级 dconfig 初始化阻塞等待完成后再启动合成器 Influence: 1. 测试 dconfig 服务正常时 treeland 能正常启动 2. 测试 dconfig 初始化失败或超时时回退默认值 3. 测试用户切换时用户配置能正确重新加载 4. 测试 greeter 场景不阻塞用户配置初始化
There was a problem hiding this comment.
Sorry @deepin-wm, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: deepin-wm The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
TAG Bot New tag: 0.8.14 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Encapsulate a
SystemDConfigManagerclass to unify ownership and initialization of system-level dconfig (TreelandConfig+TreelandUserConfig). The compositor now blocks until the global config finishes initializing (success, failure, or 5s timeout) before proceeding with business logic, ensuring configuration values are ready before they are consumed.Changes
src/seat/systemdconfigmanager.h/systemdconfigmanager.cpp— owns both dconfig objects, providesinitialize()(blocking wait),isInitializeSucceeded(),initializeSucceedsignal, andresetUserConfig().src/seat/helper.h/helper.cpp— replacem_config/m_globalConfigmembers with a singleSystemDConfigManager *m_systemConfigManager;config()/globalConfig()delegate to the manager; callinitialize()after storing the pointer to avoid null-pointer reentry during the nested event loop.src/wallpaper/wallpapermanager.cpp— switch 8 friend-access sites fromHelper::instance()->m_config->toHelper::instance()->config()->.src/CMakeLists.txt— register the two new source files.Design notes
initialize()soHelpercan store the manager pointer first — any nested-loop callback reachingHelper::config()/globalConfig()sees a valid pointer.isInitializeSucceeded()returns true only when both configs initialized successfully; failures/timeouts fall back to defaults (still safe to read).Multica issue: WM-9