feat(splash): auto-disable prelaunch splash after consecutive mismatches - #1315
feat(splash): auto-disable prelaunch splash after consecutive mismatches#1315deepin-wm wants to merge 1 commit into
Conversation
Add global config `prelaunchSplashMaxMismatchCount` (default 4, 0=never) and per-app `splashMismatchCount`. Record mismatches on splash close, timeout, and client close_splash; reset on successful window match. When count reaches threshold, disable splash for that app. 添加全局配置 `prelaunchSplashMaxMismatchCount`(默认4,0表示永不禁用) 和 per-app `splashMismatchCount`。在闪屏关闭、超时、客户端 close_splash 时记录不匹配次数;成功匹配窗口时重置。达到阈值后禁用该应用闪屏。 Log: 闪屏匹配失败自动禁用功能 Influence: 应用连续多次闪屏匹配失败后自动禁用闪屏,避免无效闪屏干扰。
|
Skipping CI for Draft Pull Request. |
|
[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 |
Reviewer's GuideImplements automatic disabling of prelaunch splash per app after a configurable number of consecutive splash mismatches, wiring new config fields through WindowConfigStore and ShellHandler to track failures and reset on successful matches. Sequence diagram for auto-disabling prelaunch splash after consecutive mismatchessequenceDiagram
actor AppProcess
participant ShellHandler
participant GlobalConfig
participant WindowConfigStore
participant AppConfig
AppProcess->>ShellHandler: createPrelaunchSplash(appId, timeoutMs)
note over ShellHandler: Splash later times out / is closed
ShellHandler->>GlobalConfig: prelaunchSplashMaxMismatchCount()
GlobalConfig-->>ShellHandler: maxMismatchCount
ShellHandler->>WindowConfigStore: recordSplashMismatch(appId, maxMismatchCount)
WindowConfigStore->>WindowConfigStore: configForApp(appId)
WindowConfigStore-->>AppConfig: obtain instance
WindowConfigStore->>AppConfig: splashMismatchCount()
WindowConfigStore->>AppConfig: setSplashMismatchCount(count+1)
alt [count+1 >= maxMismatchCount]
WindowConfigStore->>AppConfig: setEnablePrelaunchSplash(false)
WindowConfigStore->>AppConfig: setSplashMismatchCount(0)
end
note over AppProcess,ShellHandler: On a later successful match
AppProcess->>ShellHandler: ensureXdgWrapper/ensureXwaylandWrapper(targetAppId)
ShellHandler->>WindowConfigStore: resetSplashMismatchCount(targetAppId)
WindowConfigStore->>WindowConfigStore: configForApp(targetAppId)
WindowConfigStore-->>AppConfig: obtain instance
WindowConfigStore->>AppConfig: splashMismatchCount()
alt [splashMismatchCount() != 0]
WindowConfigStore->>AppConfig: setSplashMismatchCount(0)
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
TAG Bot New tag: 0.9.1 |
概述
实现 splash 匹配失败自动禁用功能。当应用的预启动闪屏连续匹配失败达到阈值次数后,自动禁用该应用的 splash 功能,避免无效闪屏干扰。
关联 issue: WM-309
改动内容
misc/dconfig/org.deepin.dde.treeland.json:新增全局配置项prelaunchSplashMaxMismatchCount(默认 4,0 表示永不自动禁用)misc/dconfig/org.deepin.dde.treeland.app.json:新增 per-app 配置项splashMismatchCount(默认 0)src/core/windowconfigstore.h/.cpp:新增recordSplashMismatch()(累计失败次数,达到阈值则置enablePrelaunchSplash=false并重置计数)和resetSplashMismatchCount()(匹配成功时重置计数)src/core/shellhandler.cpp:在 3 个失败路径(splashCloseRequested、超时、handlePrelaunchSplashClosed)调用recordSplashMismatch;在 2 个成功路径(ensureXdgWrapper、ensureXwaylandWrapper)调用resetSplashMismatchCount审核状态
Code Review 审核已通过。
Summary by Sourcery
Automatically disable prelaunch splash screens after repeated mismatches while preserving configurable per-application recovery behavior.
New Features:
Enhancements: