feat(protocol): add treeland-launch-animation-v1 protocol - #89
Conversation
|
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 GuideAdds a new experimental Wayland extension protocol treeland-launch-animation-v1 to attach a launch animation source rectangle to xdg-activation-v1 tokens, and bumps the treeland-protocols package version while registering the new XML definition in the build system. Sequence diagram for treeland-launch-animation-v1 launch flowsequenceDiagram
actor ApplicationA
actor ApplicationB
participant Compositor
participant xdg_activation_v1
participant xdg_activation_token_v1 as xdg_activation_token_v1
participant treeland_launch_animation_manager_v1 as treeland_launch_animation_manager_v1
participant treeland_launch_rect_v1 as treeland_launch_rect_v1
ApplicationA->>xdg_activation_v1: get_activation_token
ApplicationA->>xdg_activation_token_v1: set_surface
ApplicationA->>treeland_launch_animation_manager_v1: get_launch_rect(token)
treeland_launch_animation_manager_v1-->>ApplicationA: treeland_launch_rect_v1
ApplicationA->>treeland_launch_rect_v1: set_geometry(x, y, width, height)
ApplicationA->>treeland_launch_rect_v1: commit
ApplicationA->>xdg_activation_token_v1: commit
xdg_activation_token_v1-->>ApplicationA: token_string
ApplicationA-->>ApplicationB: token_string
ApplicationB->>xdg_activation_v1: activate(token_string, surface)
xdg_activation_v1->>Compositor: activate_with_token
Compositor->>Compositor: [lookup launch rectangle and convert to global coordinates]
Compositor->>Compositor: [play launch animation from rectangle to target window]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Add a new extension protocol that lets a client attach a launch animation source rectangle to an xdg-activation-v1 token. Timing and responsibilities: - Client MUST call activate before the target surface is first mapped - If activate targets an already-mapped surface, the compositor discards the rect and does not play or substitute any animation - Rectangle coordinates are relative to the originating surface local coordinate space; animation parameters are compositor policy 新增 treeland-launch-animation-v1 扩展协议,复用 xdg-activation-v1 的 token 传递链路,允许客户端为启动令牌附加动画来源矩形。 Log: 新增启动动画矩形扩展协议 Influence: 为启动动画从指定矩形区域过渡画出提供协议支持。
4c13a52 to
046c7e3
Compare
There was a problem hiding this comment.
Sorry @deepin-wm, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
deepin pr auto review☀ AI审核结果 ★ 总体评分:99分 (大于70分通过)■ 【总体评价】
■ 【详细分析】
■ 【改进建议代码示例】 <!-- 在 treeland_launch_animation_manager_v1 接口的 get_launch_rect 请求描述中补充多次调用说明 -->
<request name="get_launch_rect">
<description summary="create a launch rectangle for a token">
Creates a new launch rectangle object associated with the given
xdg_activation_token_v1 object. The rectangle geometry must be
set and committed before the token itself is committed.
If get_launch_rect is called multiple times for the same token,
each call creates an independent rect object. The compositor
uses the last successfully committed rect object and discards
all previous ones. If no rect object has been committed, no
launch animation is played.
The token must not have been committed yet. Calling get_launch_rect
on an already-committed token is a client error and the compositor
may ignore the request.
</description>
<arg name="launch_rect" type="new_id" interface="treeland_launch_rect_v1" summary="new launch rectangle object"/>
<arg name="token" type="object" interface="xdg_activation_token_v1" summary="the activation token to attach the rectangle to"/>
</request> |
There was a problem hiding this comment.
直接定义为 window-animation,用来针对wl_surface控制它的所有动画效果,不仅是窗口启动的。
还要考虑跟手机那样的,支持从应用图标到窗口打开的连贯动画。最小化、关闭窗口时动画也能回到任务栏图标上。
What
新增
treeland-launch-animation-v1扩展协议,复用 xdg-activation-v1 的 token 传递链路,允许客户端为启动令牌附加「动画来源矩形」,使合成器可从指定矩形区域播放启动动画。Protocol
treeland_launch_animation_manager_v1全局接口,提供get_launch_rect(token)创建矩形对象treeland_launch_rect_v1对象,提供set_geometry(x, y, w, h)与commit()already_committed/invalid_geometry/no_geometrycommit必须在 tokencommit之前完成Changes
xml/treeland-launch-animation-v1.xml— 新协议定义CMakeLists.txt— 注册 XML,版本 0.5.10 → 0.5.11Related
Summary by Sourcery
Add an experimental launch-animation protocol that lets clients provide a source rectangle through the xdg-activation token flow.
New Features:
Build: