fix: bind taskmanager start timer to applet lifetime#1633
Merged
deepin-bot[bot] merged 1 commit intoJun 12, 2026
Merged
Conversation
Ensure the delayed window monitor startup uses TaskManager as the Qt context. - Prevent the single-shot callback from running after the applet is destroyed. - Avoid a use-after-free during shell restart when switching between TTY and TreeLand. 确保延迟启动窗口监控的定时器使用 TaskManager 作为 Qt 上下文。 - 防止 applet 销毁后 singleShot 回调继续执行。 - 避免在 TTY 与 TreeLand 图形会话切换触发 shell 重启时出现 use-after-free。 Log: bind taskmanager start timer to applet lifetime
Reviewer's guide (collapsed on small PRs)Reviewer's GuideBinds the delayed taskmanager window monitor startup timer to the TaskManager object’s lifetime so the callback can’t run after destruction. Sequence diagram for QTimer singleShot bound to TaskManager lifetimesequenceDiagram
participant TaskManager
participant QTimer
participant WindowMonitor
TaskManager->>QTimer: singleShot(500, TaskManager, lambda)
Note right of QTimer: Timer waits 500 ms
alt [TaskManager still alive]
QTimer->>TaskManager: invoke lambda
TaskManager->>WindowMonitor: m_windowMonitor->start()
else [TaskManager destroyed before timeout]
QTimer-->>TaskManager: (callback cancelled by QObject context)
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
BLumia
approved these changes
Jun 12, 2026
Contributor
Author
|
/forcemerge |
|
This pr force merged! (status: blocked) |
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
Test plan
Summary by Sourcery
Bug Fixes: