feat(launch-animation): play launch animation from a specified rect - #1298
feat(launch-animation): play launch animation from a specified rect#1298deepin-wm wants to merge 1 commit into
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 GuideImplements a new server-side treeland launch-animation module and wires it into the xdg-activation flow so the compositor can play a window open animation from a client-specified rectangle; extends activation token handling to carry originating surfaces and launch rectangles, propagates them through Helper into SurfaceWrapper to drive GeometryAnimation, adds logging and CMake wiring, and provides a sender/receiver demo example. Sequence diagram for launch animation via activation tokensequenceDiagram
actor Client
participant LaunchAnimationManagerInterfaceV1 as LaunchAnimationManager
participant ActivationManagerInterfaceV1 as ActivationManager
participant Helper
participant SurfaceWrapper
Client->>LaunchAnimationManager: treeland_launch_animation_manager_v1.get_launch_rect
LaunchAnimationManager->>Client: treeland_launch_rect_v1
Client->>LaunchAnimationManager: treeland_launch_rect_v1.set_geometry
Client->>LaunchAnimationManager: treeland_launch_rect_v1.commit
LaunchAnimationManager->>LaunchAnimationManager: m_committedRects.insert(tokenResource, rect)
Client->>ActivationManager: xdg_activation_token_v1.commit
ActivationManager->>ActivationManager: launchRectProvider(tokenResourceHandle)
ActivationManager->>LaunchAnimationManager: takeCommittedRect(tokenResource)
LaunchAnimationManager-->>ActivationManager: std_optional_QRectF
ActivationManager->>ActivationManager: registerToken(appId, client, serial, activate, originatingSurface, launchRect)
Client->>ActivationManager: xdg_activation_v1.activate
ActivationManager->>ActivationManager: find token -> disposition, originatingSurface, launchRect
ActivationManager-->>Helper: activateRequested(disposition, wsurface, originatingSurface, launchRect)
Helper->>SurfaceWrapper: setLaunchAnimationRect(globalRect)
alt surface maps and launch rect valid
SurfaceWrapper->>SurfaceWrapper: createNewOrClose(OPEN_ANIMATION)
SurfaceWrapper->>SurfaceWrapper: m_engine.createGeometryAnimation(fromGeometry, toGeometry)
SurfaceWrapper-->>SurfaceWrapper: onLaunchAnimationFinished
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
a97d42b to
d2ac94b
Compare
4af5f35 to
4bf9a95
Compare
Add a server-side launch-animation module and integrate it with the activation token flow so the compositor plays a launch animation originating from a client-specified rectangle. The launch rect is in surface-local coordinates (relative to the originating WSurface content). Use WSurfaceItem::mapFromSurface() to convert it into the wrapper coordinate space (accounting for title-bar and decoration padding) before adding the wrapper's global position. The target geometry is sampled only after WSurfaceItem::readyChanged fires and one event-loop iteration later, so the layout chain (widthChanged → arrangeNonLayerSurface → setPosition) has settled and position()/size() are no longer stale. 新增启动动画模块并集成至 activation token 流程:合成器在收到带 launch rect 的 activate 请求时,结合发起方 surface 位置换算全局 矩形,从该区域播放启动动画。含 sender/receiver demo 示例。 Log: 实现启动动画从指定矩形区域过渡画出 Influence: 应用启动时可从发起方指定矩形区域过渡画出启动动画。
4bf9a95 to
dde6d37
Compare
|
TAG Bot New tag: 0.9.0 |
What
在 treeland 侧实现启动动画:新增
launch-animation服务端模块,集成至 xdg-activation token 流程,使合成器可从客户端指定的矩形区域播放启动动画。含 sender/receiver demo。Changes
src/modules/launch-animation/— 新模块,服务端协议实现(LaunchAnimationManagerInterfaceV1,管理矩形对象,按 token resource 索引已 commit 矩形)src/modules/activation/activationmanagerinterfacev1.{h,cpp}— 新增setLaunchRectProvider()回调;TokenInfo增加originatingSurface/launchRect;activate()在有 launch rect 时允许 unmapped surface;activateRequested扩展为携带 originatingSurface 与 launchRect;一次性 token 语义src/seat/helper.{h,cpp}— 创建LaunchAnimationManager,设置 provider,在activateRequested中换算全局矩形并存入目标SurfaceWrappersrc/surface/surfacewrapper.{h,cpp}— 新增m_launchAnimationRect,createNewOrClose()在有 launch rect 时使用GeometryAnimationsrc/common/treelandlogging.{h,cpp}— 新增 launchAnimation 日志分类examples/test_launch_animation/— demo:sender 显示图片按空格启动 receiver,receiver 全屏显示图片并请求动画依赖
treeland-launch-animation-v1)Related
Summary by Sourcery
Implement client-specified launch animations throughout activation handling, surface mapping, and compositor presentation.
New Features:
Bug Fixes:
Enhancements:
Build: