fix: delay discovery service init to prevent focus stealing#726
Conversation
207da17 to
3f36d14
Compare
Move DiscoverController::init() call to after dMain->show() with 500ms delay via QTimer::singleShot, ensuring main window is visible before any discovery/auth dialogs appear. 延迟发现服务初始化至主窗口显示之后,避免主窗口抢占授权框焦点。 Log: 延迟发现服务弹框,修复焦点抢占 PMS: BUG-355969 Influence: 打开跨端协同时密码输入框默认可输入,不再被主窗口抢焦点
3f36d14 to
694f58f
Compare
deepin pr auto review代码审查报告经过对提供的 1. 语法逻辑
2. 代码质量
3. 代码性能
4. 代码安全
总结与改进建议这段代码变更主要是为了优化用户体验(防止焦点抢夺)和性能(按需加载、异步初始化)。整体逻辑清晰,改动合理。 改进建议:
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: lzwind, pppanghu77, re2zero 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 |
Summary
DiscoverController::init()to after main windowshow()viaQTimer::singleShot(500ms)Root Cause
CooperaionCorePlugin::start()calledDiscoverController::init()beforedMain->show(). When the discovery service dialog was shown (blockingexec()), after it closed the main window appeared and stole focus from subsequent input dialogs.Test Plan