Conversation
Added close_splash request to treeland_prelaunch_splash_manager_v1 protocol Bumped protocol version from 1 to 2 to reflect the new feature The close_splash method allows compositors to dismiss splash screens when applications exit or crash before their main window is mapped This prevents orphaned splash screens from remaining visible when the associated application fails to start properly The method requires the same app_id and sandbox_engine_name used when creating the splash for proper identification Log: Added ability to close prelaunch splash screens when applications fail to start Influence: 1. Test creating a splash screen and then closing it with the new method 2. Verify that providing incorrect app_id or sandbox_engine_name fails to close the splash 3. Test edge cases like empty strings or null values for parameters 4. Ensure backward compatibility with existing protocol version 1 clients 5. Verify splash screen cleanup behavior when application crashes feat: 为协议添加启动画面关闭方法 在 treeland_prelaunch_splash_manager_v1 协议中添加了 close_splash 请求 将协议版本从 1 提升到 2 以反映新功能 close_splash 方法允许合成器在应用程序退出或崩溃时关闭启动画面 这可以防止在关联应用程序启动失败时出现孤立的启动画面残留 该方法需要与创建启动画面时相同的 app_id 和 sandbox_engine_name 用于正确 识别 Log: 新增在应用程序启动失败时关闭预启动画面的能力 Influence: 1. 测试创建启动画面后使用新方法关闭它 2. 验证提供错误的 app_id 或 sandbox_engine_name 时无法关闭启动画面 3. 测试参数为空字符串或 null 值的边界情况 4. 确保与现有协议版本 1 客户端的向后兼容性 5. 验证应用程序崩溃时的启动画面清理行为
将 CMakeLists.txt 中的项目版本从 0.5.3 更新至 0.5.5
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: wineee 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 review这段代码修改主要涉及 Wayland 协议的扩展,用于处理启动画面的关闭逻辑。以下是对该 diff 的审查意见,分为语法逻辑、代码质量、代码性能和代码安全四个方面: 1. 语法逻辑
2. 代码质量
3. 代码性能
4. 代码安全
总结这段 diff 逻辑清晰,文档完善,符合 Wayland 协议的扩展规范。 主要改进建议: 修改后的 XML 片段建议: <request name="close_splash" since="2">
<description summary="close an existing splash screen">
<!-- ... description content ... -->
</description>
<arg name="app_id" type="string" summary="the application ID"/>
<arg name="sandbox_engine_name" type="string" summary="the sandbox engine / security context name (required, non-empty)"/>
</request> |
| Closes an existing prelaunch splash screen for the given application. | ||
|
|
||
| This should be used when the application exits or crashes before | ||
| its main window is mapped, so the compositor can dismiss the splash. |
There was a problem hiding this comment.
如果AM是使用方,它应该不知道window is mapped,所以这里加上这个要求对于使用方来说难以接受。其实只要这个splash对象在,AM里就可以调用这个接口来关闭它,不用关心main window的状态。
| <arg name="icon_buffer" type="object" interface="wl_buffer" allow-null="true" summary="optional icon image as wl_buffer (e.g. wl_shm)"/> | ||
| </request> | ||
|
|
||
| <request name="close_splash" since="2"> |
There was a problem hiding this comment.
可以在create_splash里加一个new_id返回一个 treeland_prelaunch_splash_v1 的对象,这样就不用加一个 close_splash了,要close直接调用 treeland_prelaunch_splash_v1 的destroy方法,而且有了对象以后,还方便添加一些event给AM做通知,比如splash超时关闭了。
最后很重要的一点,不是所有应用都是单例的,对于非单例应用,create_splash应该允许调用多次,但是create_splash里只有 app_id 等参数,这些跟程序运行的实例无关,无法做区分,因此close_splash时并不知道应该关闭具体哪个闪屏,所以添加 treeland_prelaunch_splash_v1 对象就变得有意义了,AM可以用这个对象跟具体的实例对应到一起。反之,create_splash中应该添加一个 instance_id 参数,便于AM告诉Treeland是为哪个实例创建的slpash,可以让treeland侧将某个闪屏与具体的AM实例关联到一起。
No description provided.