Skip to content

fix: reset blur state on context destroy in PersonalizationWindowContextV1#993

Open
deepin-wm wants to merge 2 commits into
linuxdeepin:masterfrom
deepin-wm:fix/personalization-blur-reset
Open

fix: reset blur state on context destroy in PersonalizationWindowContextV1#993
deepin-wm wants to merge 2 commits into
linuxdeepin:masterfrom
deepin-wm:fix/personalization-blur-reset

Conversation

@deepin-wm

Copy link
Copy Markdown
Contributor
  • Verify no stale signal connections cause unexpected blur state changes

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @deepin-wm, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@deepin-wm deepin-wm force-pushed the fix/personalization-blur-reset branch 2 times, most recently from 6984131 to e828a3b Compare June 17, 2026 03:38
@deepin-bot

deepin-bot Bot commented Jun 17, 2026

Copy link
Copy Markdown

TAG Bot

New tag: 0.8.11
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #999

@zorowk

zorowk commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

测试的例子在不修改协议的情况下运行一遍会导致设置透明和模糊都失效
测试例子在修改协议情况下运行正常

@deepin-wm deepin-wm force-pushed the fix/personalization-blur-reset branch 2 times, most recently from 5c443e2 to bca335e Compare June 18, 2026 02:53
@deepin-wm deepin-wm closed this Jun 18, 2026
@deepin-wm deepin-wm force-pushed the fix/personalization-blur-reset branch from bca335e to 49fd5f1 Compare June 18, 2026 03:21
@deepin-wm deepin-wm reopened this Jun 18, 2026
@deepin-ci-robot

Copy link
Copy Markdown

[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.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

1 similar comment
@deepin-ci-robot

Copy link
Copy Markdown

[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.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@deepin-wm deepin-wm force-pushed the fix/personalization-blur-reset branch from 061c16b to c1c47da Compare June 18, 2026 03:51
@deepin-wm deepin-wm force-pushed the fix/personalization-blur-reset branch from c1c47da to 8c86507 Compare June 18, 2026 04:13
deepin-wm pushed a commit to deepin-wm/treeland that referenced this pull request Jun 18, 2026
1. Override themeHint() to return CursorFlashTime and
   MouseDoubleClickInterval from TreelandUserConfig
2. Override font() to return SystemFont and FixedFont
   based on DConfig font/monoFont/fontSize settings
3. Add notifyThemeChanged() to trigger Qt theme refresh
   via QWindowSystemInterface::handleThemeChanged()
4. Add connectConfigSignals() to bind DConfig change
   signals to theme refresh, with disconnect on user
   switch to prevent duplicate connections
5. Connect Helper::configChanged to reconnect signals
   when user configuration is rebuilt

Log: Treeland cursor blink interval, double click interval,
system font and monospace font now follow DConfig settings

Influence:
1. Verify cursor blink interval changes when toggling
   cursorBlink or adjusting cursorBlinkTime in DConfig
2. Verify double click interval updates when changing
   doubleClickTime in DConfig
3. Verify system font and monospace font update when
   changing font, monoFont or fontSize in DConfig
4. Verify theme hints revert to QGenericUnixTheme
   defaults when no config is available

feat: 让 QDeepinTheme 跟随 DConfig 设置

1. 覆盖 themeHint() 从 TreelandUserConfig 获取
   CursorFlashTime 和 MouseDoubleClickInterval
2. 覆盖 font() 根据 DConfig 的 font/monoFont/fontSize
   设置返回 SystemFont 和 FixedFont
3. 添加 notifyThemeChanged() 通过
   QWindowSystemInterface::handleThemeChanged() 触发 Qt 主题刷新
4. 添加 connectConfigSignals() 绑定 DConfig 变更信号到
   主题刷新,用户切换时先断开旧连接防止重复绑定
5. 连接 Helper::configChanged 以在用户配置重建时
   重新绑定信号

Log: treeland 光标闪动间隔、双击间隔、系统字体和等宽字体现在跟随 DConfig 设置

Influence:
1. 验证切换 cursorBlink 或调整 cursorBlinkTime 时光标闪动间隔是否更新
2. 验证修改 doubleClickTime 时双击间隔是否更新
3. 验证修改 font、monoFont 或 fontSize 时系统字体和等宽字体是否更新
4. 验证无 config 可用时回退到 QGenericUnixTheme 默认值

Fixes: linuxdeepin#993
@deepin-wm deepin-wm force-pushed the fix/personalization-blur-reset branch from 8c86507 to 7efd841 Compare June 18, 2026 04:42
deepin-wm pushed a commit to deepin-wm/treeland that referenced this pull request Jun 18, 2026
1. Override themeHint() to return CursorFlashTime and
   MouseDoubleClickInterval from TreelandUserConfig
2. Override font() to return SystemFont and FixedFont
   based on DConfig font/monoFont/fontSize settings
3. Add notifyThemeChanged() to trigger Qt theme refresh
   via QWindowSystemInterface::handleThemeChanged()
4. Add connectConfigSignals() to bind DConfig change
   signals to theme refresh, with disconnect on user
   switch to prevent duplicate connections
5. Connect Helper::configChanged to reconnect signals
   when user configuration is rebuilt

Log: Treeland cursor blink interval, double click interval,
system font and monospace font now follow DConfig settings

Influence:
1. Verify cursor blink interval changes when toggling
   cursorBlink or adjusting cursorBlinkTime in DConfig
2. Verify double click interval updates when changing
   doubleClickTime in DConfig
3. Verify system font and monospace font update when
   changing font, monoFont or fontSize in DConfig
4. Verify theme hints revert to QGenericUnixTheme
   defaults when no config is available

feat: 让 QDeepinTheme 跟随 DConfig 设置

1. 覆盖 themeHint() 从 TreelandUserConfig 获取
   CursorFlashTime 和 MouseDoubleClickInterval
2. 覆盖 font() 根据 DConfig 的 font/monoFont/fontSize
   设置返回 SystemFont 和 FixedFont
3. 添加 notifyThemeChanged() 通过
   QWindowSystemInterface::handleThemeChanged() 触发 Qt 主题刷新
4. 添加 connectConfigSignals() 绑定 DConfig 变更信号到
   主题刷新,用户切换时先断开旧连接防止重复绑定
5. 连接 Helper::configChanged 以在用户配置重建时
   重新绑定信号

Log: treeland 光标闪动间隔、双击间隔、系统字体和等宽字体现在跟随 DConfig 设置

Influence:
1. 验证切换 cursorBlink 或调整 cursorBlinkTime 时光标闪动间隔是否更新
2. 验证修改 doubleClickTime 时双击间隔是否更新
3. 验证修改 font、monoFont 或 fontSize 时系统字体和等宽字体是否更新
4. 验证无 config 可用时回退到 QGenericUnixTheme 默认值

Fixes: linuxdeepin#993
@deepin-wm deepin-wm force-pushed the fix/personalization-blur-reset branch 2 times, most recently from b12c187 to 9b44abc Compare June 18, 2026 05:04
deepin-wm pushed a commit to deepin-wm/treeland that referenced this pull request Jun 18, 2026
1. Override themeHint() to return CursorFlashTime and
   MouseDoubleClickInterval from TreelandUserConfig
2. Override font() to return SystemFont and FixedFont
   based on DConfig font/monoFont/fontSize settings
3. Add notifyThemeChanged() to trigger Qt theme refresh
   via QWindowSystemInterface::handleThemeChanged()
4. Add connectConfigSignals() to bind DConfig change
   signals to theme refresh, with disconnect on user
   switch to prevent duplicate connections
5. Connect Helper::configChanged to reconnect signals
   when user configuration is rebuilt

Log: Treeland cursor blink interval, double click interval,
system font and monospace font now follow DConfig settings

Influence:
1. Verify cursor blink interval changes when toggling
   cursorBlink or adjusting cursorBlinkTime in DConfig
2. Verify double click interval updates when changing
   doubleClickTime in DConfig
3. Verify system font and monospace font update when
   changing font, monoFont or fontSize in DConfig
4. Verify theme hints revert to QGenericUnixTheme
   defaults when no config is available

feat: 让 QDeepinTheme 跟随 DConfig 设置

1. 覆盖 themeHint() 从 TreelandUserConfig 获取
   CursorFlashTime 和 MouseDoubleClickInterval
2. 覆盖 font() 根据 DConfig 的 font/monoFont/fontSize
   设置返回 SystemFont 和 FixedFont
3. 添加 notifyThemeChanged() 通过
   QWindowSystemInterface::handleThemeChanged() 触发 Qt 主题刷新
4. 添加 connectConfigSignals() 绑定 DConfig 变更信号到
   主题刷新,用户切换时先断开旧连接防止重复绑定
5. 连接 Helper::configChanged 以在用户配置重建时
   重新绑定信号

Log: treeland 光标闪动间隔、双击间隔、系统字体和等宽字体现在跟随 DConfig 设置

Influence:
1. 验证切换 cursorBlink 或调整 cursorBlinkTime 时光标闪动间隔是否更新
2. 验证修改 doubleClickTime 时双击间隔是否更新
3. 验证修改 font、monoFont 或 fontSize 时系统字体和等宽字体是否更新
4. 验证无 config 可用时回退到 QGenericUnixTheme 默认值

Fixes: linuxdeepin#993
deepin-wm pushed a commit to deepin-wm/treeland that referenced this pull request Jun 18, 2026
1. Override themeHint() to return CursorFlashTime and
   MouseDoubleClickInterval from TreelandUserConfig
2. Override font() to return SystemFont and FixedFont
   based on DConfig font/monoFont/fontSize settings
3. Add notifyThemeChanged() to trigger Qt theme refresh
   via QWindowSystemInterface::handleThemeChanged()
4. Add connectConfigSignals() to bind DConfig change
   signals to theme refresh, with disconnect on user
   switch to prevent duplicate connections
5. Connect Helper::configChanged to reconnect signals
   when user configuration is rebuilt

Log: Treeland cursor blink interval, double click interval,
system font and monospace font now follow DConfig settings

Influence:
1. Verify cursor blink interval changes when toggling
   cursorBlink or adjusting cursorBlinkTime in DConfig
2. Verify double click interval updates when changing
   doubleClickTime in DConfig
3. Verify system font and monospace font update when
   changing font, monoFont or fontSize in DConfig
4. Verify theme hints revert to QGenericUnixTheme
   defaults when no config is available

feat: 让 QDeepinTheme 跟随 DConfig 设置

1. 覆盖 themeHint() 从 TreelandUserConfig 获取
   CursorFlashTime 和 MouseDoubleClickInterval
2. 覆盖 font() 根据 DConfig 的 font/monoFont/fontSize
   设置返回 SystemFont 和 FixedFont
3. 添加 notifyThemeChanged() 通过
   QWindowSystemInterface::handleThemeChanged() 触发 Qt 主题刷新
4. 添加 connectConfigSignals() 绑定 DConfig 变更信号到
   主题刷新,用户切换时先断开旧连接防止重复绑定
5. 连接 Helper::configChanged 以在用户配置重建时
   重新绑定信号

Log: treeland 光标闪动间隔、双击间隔、系统字体和等宽字体现在跟随 DConfig 设置

Influence:
1. 验证切换 cursorBlink 或调整 cursorBlinkTime 时光标闪动间隔是否更新
2. 验证修改 doubleClickTime 时双击间隔是否更新
3. 验证修改 font、monoFont 或 fontSize 时系统字体和等宽字体是否更新
4. 验证无 config 可用时回退到 QGenericUnixTheme 默认值

Fixes: linuxdeepin#993
deepin-wm pushed a commit to deepin-wm/treeland that referenced this pull request Jun 18, 2026
1. Override themeHint() to return CursorFlashTime and
   MouseDoubleClickInterval from TreelandUserConfig
2. Override font() to return SystemFont and FixedFont
   based on DConfig font/monoFont/fontSize settings
3. Add notifyThemeChanged() to trigger Qt theme refresh
   via QWindowSystemInterface::handleThemeChanged()
4. Add connectConfigSignals() to bind DConfig change
   signals to theme refresh, with disconnect on user
   switch to prevent duplicate connections
5. Connect Helper::configChanged to reconnect signals
   when user configuration is rebuilt

Log: Treeland cursor blink interval, double click interval,
system font and monospace font now follow DConfig settings

Influence:
1. Verify cursor blink interval changes when toggling
   cursorBlink or adjusting cursorBlinkTime in DConfig
2. Verify double click interval updates when changing
   doubleClickTime in DConfig
3. Verify system font and monospace font update when
   changing font, monoFont or fontSize in DConfig
4. Verify theme hints revert to QGenericUnixTheme
   defaults when no config is available

feat: 让 QDeepinTheme 跟随 DConfig 设置

1. 覆盖 themeHint() 从 TreelandUserConfig 获取
   CursorFlashTime 和 MouseDoubleClickInterval
2. 覆盖 font() 根据 DConfig 的 font/monoFont/fontSize
   设置返回 SystemFont 和 FixedFont
3. 添加 notifyThemeChanged() 通过
   QWindowSystemInterface::handleThemeChanged() 触发 Qt 主题刷新
4. 添加 connectConfigSignals() 绑定 DConfig 变更信号到
   主题刷新,用户切换时先断开旧连接防止重复绑定
5. 连接 Helper::configChanged 以在用户配置重建时
   重新绑定信号

Log: treeland 光标闪动间隔、双击间隔、系统字体和等宽字体现在跟随 DConfig 设置

Influence:
1. 验证切换 cursorBlink 或调整 cursorBlinkTime 时光标闪动间隔是否更新
2. 验证修改 doubleClickTime 时双击间隔是否更新
3. 验证修改 font、monoFont 或 fontSize 时系统字体和等宽字体是否更新
4. 验证无 config 可用时回退到 QGenericUnixTheme 默认值

Fixes: linuxdeepin#993
@deepin-wm deepin-wm force-pushed the fix/personalization-blur-reset branch from 9b44abc to fd157ab Compare June 18, 2026 06:59
@zorowk zorowk requested review from Groveer and zzxyb June 18, 2026 07:15
@zorowk

zorowk commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

之前的代码在 update lambda表达式中 disconnect connection 但是没有机制再次建立连接,导致后续重新连接上的window设置失效

deepin-wm pushed a commit to deepin-wm/treeland that referenced this pull request Jun 18, 2026
1. Override themeHint() to return CursorFlashTime and MouseDoubleClickInterval from TreelandUserConfig
2. Override font() to return SystemFont and FixedFont based on DConfig font/monoFont/fontSize settings
3. Add notifyThemeChanged() to trigger Qt theme refresh via QWindowSystemInterface::handleThemeChanged()
4. Add connectConfigSignals() to bind DConfig change signals to theme refresh, with disconnect on user switch to prevent duplicate connections
5. Connect Helper::configChanged to reconnect signals when user configuration is rebuilt
6. Add missing QWindow include for static_cast in notifyThemeChanged()

Log: Treeland cursor blink interval, double click interval, system font and monospace font now follow DConfig settings

Influence:
1. Verify cursor blink interval changes when toggling cursorBlink or adjusting cursorBlinkTime in DConfig
2. Verify double click interval updates when changing doubleClickTime in DConfig
3. Verify system font and monospace font update when changing font, monoFont or fontSize in DConfig
4. Verify theme hints revert to QGenericUnixTheme defaults when no config is available

feat: 让 QDeepinTheme 跟随 DConfig 设置

1. 覆盖 themeHint() 从 TreelandUserConfig 获取 CursorFlashTime 和 MouseDoubleClickInterval
2. 覆盖 font() 根据 DConfig 的 font/monoFont/fontSize 设置返回 SystemFont 和 FixedFont
3. 添加 notifyThemeChanged() 通过 QWindowSystemInterface::handleThemeChanged() 触发 Qt 主题刷新
4. 添加 connectConfigSignals() 绑定 DConfig 变更信号到主题刷新,用户切换时先断开旧连接防止重复绑定
5. 连接 Helper::configChanged 以在用户配置重建时重新绑定信号
6. 添加缺失的 QWindow 头文件以修复 notifyThemeChanged 中 static_cast 的编译错误

Log: treeland 光标闪动间隔、双击间隔、系统字体和等宽字体现在跟随 DConfig 设置

Influence:
1. 验证切换 cursorBlink 或调整 cursorBlinkTime 时光标闪动间隔是否更新
2. 验证修改 doubleClickTime 时双击间隔是否更新
3. 验证修改 font、monoFont 或 fontSize 时系统字体和等宽字体是否更新
4. 验证无 config 可用时回退到 QGenericUnixTheme 默认值

Fixes: linuxdeepin#993
@deepin-wm deepin-wm force-pushed the fix/personalization-blur-reset branch from fd157ab to b422375 Compare June 18, 2026 08:29
deepin-wm added 2 commits June 18, 2026 17:01
…extV1

Use QPointer + m_currentContext to track the active context instead of
manual connection management. When context is destroyed, QPointer
auto-nulls and Qt auto-disconnects signals, eliminating the need for
explicit destroyed handlers. aboutToBeInvalidated now calls deleteLater
for automatic cleanup.

1. Replace m_connection/m_contextDestroyedConnection with QPointer m_currentContext
2. Always listen to windowContextCreated, disconnect old context signals on switch
3. Remove explicit destroyed callback - Qt handles signal cleanup automatically
4. Emit all changed signals after property assignment for consistent downstream state
1. Add test_window_blur example with manual context create/destroy
2. Implement automated test scenarios for blur state verification
3. Use deleteLater() instead of delete for window context
@deepin-wm deepin-wm force-pushed the fix/personalization-blur-reset branch from b422375 to e1bd7ae Compare June 18, 2026 09:02
@zorowk zorowk requested a review from zccrs June 18, 2026 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants