fix: reset blur state on context destroy in PersonalizationWindowContextV1#993
Open
deepin-wm wants to merge 2 commits into
Open
fix: reset blur state on context destroy in PersonalizationWindowContextV1#993deepin-wm wants to merge 2 commits into
deepin-wm wants to merge 2 commits into
Conversation
deepin-wm
commented
Jun 16, 2026
Contributor
- Verify no stale signal connections cause unexpected blur state changes
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
|
[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 |
…extV1 1. Reset m_backgroundType to Normal and other properties when PersonalizationWindowContextV1 is destroyed, and emit corresponding changed signals to notify downstream observers 2. Add m_target validity check in destroyed callback to prevent reconnecting signals after surface becomes invalid 3. Disconnect m_contextDestroyedConnection in update lambda and aboutToBeInvalidated handler to avoid stale destroyed connections when new context replaces old one 4. Replace magic numbers 0-2 in set_blend_mode validation with protocol enum constants TREELAND_PERSONALIZATION_WINDOW_CONTEXT_V1_BLEND_MODE_TRANSPARENT/BLUR 5. Extract update logic into updateFromContext method to fix auto self-reference compilation error Log: Fixed window blur effect persisting after the requesting context was destroyed Influence: 1. Test that blur effect is removed when the personalization window context is destroyed 2. Test that a new context can correctly re-apply blur after the old one is destroyed 3. Test that invalid blend mode values are rejected with protocol error 4. Verify no stale signal connections cause unexpected blur state changes fix: PersonalizationWindowContextV1销毁时重置blur状态 1. PersonalizationWindowContextV1销毁时将m_backgroundType重置为Normal并发射changed信号,通知下游观察者状态变化 2. destroyed回调中增加m_target有效性检查,防止surface无效后重连信号 3. update lambda和aboutToBeInvalidated处理器中断开m_contextDestroyedConnection,避免新context替换旧context时残留destroyed连接 4. set_blend_mode参数验证使用协议枚举常量替代魔法数字0-2 5. 提取更新逻辑为updateFromContext方法,修复auto自引用编译错误 Log: 修复窗口模糊效果在请求上下文销毁后仍然残留的问题 Influence: 1. 测试personalization window context销毁后blur效果是否正确移除 2. 测试旧context销毁后新context能否正确重新应用blur 3. 测试无效blend mode值是否被协议错误拒绝 4. 验证无残留信号连接导致意外的blur状态变化
80fab16 to
26d3e78
Compare
1. Add test_window_blur example with manual context create/destroy and blend mode toggle controls 2. Implement 4 automated test scenarios: blur then destroy, normal blur, destroy then recreate without blur, destroy then set transparent 3. Add m_scenarioRunning guard to prevent overlapping timed scenarios 4. Use deleteLater() instead of delete for window context to avoid destroy+delete timing issues Influence: 1. Verify blur effect is removed when context is destroyed (Scenario A) 2. Verify blur displays correctly when requested (Scenario B) 3. Verify no residual blur after context destroy and recreate without blur (Scenario C) 4. Verify blur correctly switches when context destroyed then recreated with transparent mode (Scenario D) test: 新增窗口模糊测试工具验证personalization协议 1. 添加test_window_blur示例,支持手动创建/销毁context和切换blend mode 2. 实现4个自动化测试场景:blur后销毁、正常blur、销毁后重建不设blur、销毁后设transparent 3. 添加m_scenarioRunning标志位防止定时场景交错执行 4. 使用deleteLater()替代delete避免destroy+delete时序问题 Influence: 1. 验证context销毁后blur效果正确消失(场景A) 2. 验证请求blur时模糊正常显示(场景B) 3. 验证销毁后重建context不设blur时无残留模糊(场景C) 4. 验证销毁后重建context设transparent时模糊正确切换(场景D)
6984131 to
e828a3b
Compare
|
TAG Bot New tag: 0.8.11 |
Contributor
|
测试的例子在不修改协议的情况下运行一遍会导致设置透明和模糊都失效 |
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.