fix(taskmanager): debounce window destroy for Wine apps to prevent ta…#1472
Closed
Ivy233 wants to merge 1 commit intolinuxdeepin:masterfrom
Closed
fix(taskmanager): debounce window destroy for Wine apps to prevent ta…#1472Ivy233 wants to merge 1 commit intolinuxdeepin:masterfrom
Ivy233 wants to merge 1 commit intolinuxdeepin:masterfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Ivy233 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 |
deepin pr auto reviewGit Diff 代码审查报告总体评价这段代码实现了对 Wine 窗口的特殊处理,主要是为了解决 Wine 窗口在关闭/重启时的防抖动问题。代码整体逻辑清晰,但存在一些内存管理、性能和潜在并发问题需要改进。 详细审查1. 语法逻辑问题 1:
|
…skbar icon flicker Wine apps (e.g. WeCom) go through IconicState → WithdrawnState → NormalState when restoring from tray. The WithdrawnState phase causes kwin to remove the window from _NET_CLIENT_LIST, and ~200ms later NormalState adds it back. This caused the AppItem to be destroyed and recreated, making the taskbar icon disappear and reappear at the end. Add a 100ms debounce for Wine window removal by detecting __wine_prefix X11 property on window map and deferring windowDestroyed signal. If the window reappears within the timeout, the destroy is cancelled and the icon stays in place. Wine 应用(如企业微信)从托盘恢复时,X11 状态转换路径为 IconicState → WithdrawnState → NormalState。WithdrawnState 阶段导致 kwin 将窗口从 _NET_CLIENT_LIST 中移除,约 200ms 后 NormalState 又将其加回。这导致 AppItem 被销毁再重建,图标从任务栏消失后出现在末尾位置。 通过在窗口映射时检测 __wine_prefix X11 属性识别 Wine 窗口,对其移除操作添加 100ms 防抖延迟。若窗口在超时前重新出现,则取消销毁,图标保持原位不闪烁。 PMS: BUG-342741
069d899 to
113fd77
Compare
BLumia
reviewed
Mar 4, 2026
Member
BLumia
left a comment
There was a problem hiding this comment.
建议bug单降级吧(降到4),为了wine特殊处理这个太怪了,考虑到企业微信说不定快出原生版本了。
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.
…skbar icon flicker
Wine apps (e.g. WeCom) go through IconicState → WithdrawnState → NormalState when restoring from tray. The WithdrawnState phase causes kwin to remove the window from _NET_CLIENT_LIST, and ~200ms later NormalState adds it back. This caused the AppItem to be destroyed and recreated, making the taskbar icon disappear and reappear at the end.
Add a 100ms debounce for Wine window removal by detecting __wine_prefix X11 property on window map and deferring windowDestroyed signal. If the window reappears within the timeout, the destroy is cancelled and the icon stays in place.
Wine 应用(如企业微信)从托盘恢复时,X11 状态转换路径为 IconicState →
WithdrawnState → NormalState。WithdrawnState 阶段导致 kwin 将窗口从 _NET_CLIENT_LIST 中移除,约 200ms 后 NormalState 又将其加回。这导致 AppItem 被销毁再重建,图标从任务栏消失后出现在末尾位置。
通过在窗口映射时检测 __wine_prefix X11 属性识别 Wine 窗口,对其移除操作添加 100ms 防抖延迟。若窗口在超时前重新出现,则取消销毁,图标保持原位不闪烁。
PMS: BUG-342741