Skip to content

WIP: 分屏动效与四分屏 - #1289

Draft
glyvut wants to merge 2 commits into
linuxdeepin:masterfrom
glyvut:Tile
Draft

WIP: 分屏动效与四分屏#1289
glyvut wants to merge 2 commits into
linuxdeepin:masterfrom
glyvut:Tile

Conversation

@glyvut

@glyvut glyvut commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Summary by Sourcery

Add animated edge previews and support four-way corner tiling during window dragging.

New Features:

  • Add four-corner edge tiling modes with configurable quadrant trigger zones.
  • Animate edge-tile previews from the dragged window geometry to the target tile.

Enhancements:

  • Extend edge-tile detection and preview updates to use the active seat and support corner targets.

@deepin-ci-robot

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: glyvut

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sourcery-ai

sourcery-ai Bot commented Aug 17, 2026

Copy link
Copy Markdown

Reviewer's Guide

Implements animated edge-tiling preview that grows from the dragged window and adds four-corner (quadrant) tiling modes triggered by cursor position along the screen edges.

Sequence diagram for animated edge-tiling preview from dragged window

sequenceDiagram
    actor User
    participant WSeat
    participant SeatSurfaceManager
    participant RootSurfaceContainer
    participant QuickTile
    participant EdgeTilePreview

    User->>WSeat: drag window to screen edge
    WSeat->>SeatSurfaceManager: startEdgeTileDelay
    SeatSurfaceManager->>RootSurfaceContainer: detectEdgeTilingForSeat
    RootSurfaceContainer->>RootSurfaceContainer: outputAt(pos)
    RootSurfaceContainer->>QuickTile: geometry(mode, output)
    QuickTile-->>RootSurfaceContainer: QRectF geo
    RootSurfaceContainer->>RootSurfaceContainer: getSeatContainerOrDefault(seat)
    RootSurfaceContainer->>RootSurfaceContainer: moveResizeSurface
    RootSurfaceContainer-->>RootSurfaceContainer: QRectF sourceGeo
    RootSurfaceContainer->>EdgeTilePreview: setProperty(sourceGeometry, sourceGeo)
    RootSurfaceContainer->>EdgeTilePreview: setProperty(targetGeometry, geo)
    RootSurfaceContainer->>EdgeTilePreview: setVisible(true)
    EdgeTilePreview->>EdgeTilePreview: onVisibleChanged
    EdgeTilePreview->>EdgeTilePreview: applyGeometry(sourceGeometry)
    EdgeTilePreview->>EdgeTilePreview: applyGeometry(targetGeometry)
    EdgeTilePreview->>EdgeTilePreview: NumberAnimation on x,y,width,height
Loading

File-Level Changes

Change Details Files
Add animation support to the edge tile preview so it transitions from the dragged surface geometry to the target tile area.
  • Introduce root id, sourceGeometry/targetGeometry properties, and animation control flags in EdgeTilePreview.qml
  • Implement applyGeometry helper and visible/targetGeometry change handlers to drive geometry updates
  • Add Behaviors with NumberAnimation on x, y, width, and height, gated by animationEnabled
src/core/qml/EdgeTilePreview.qml
Use the moved surface geometry as the starting point for the edge tile preview and propagate seat information to the preview update.
  • Change updateEdgeTilePreview signature to accept WSeat and default to nullptr
  • Lookup the seat-specific container and its moveResizeSurface to fetch current window geometry
  • Set sourceGeometry and targetGeometry properties on the preview instead of directly setting x/y/width/height
  • Update all callers to pass the seat when triggering the edge tile preview
src/core/rootsurfacecontainer.cpp
src/core/rootsurfacecontainer.h
src/surface/seatsurfacemanager.cpp
Add quadrant (corner) tiling modes and geometry calculations for four-way tiling.
  • Extend QuickTile::Mode enum with TopLeft, TopRight, BottomLeft, BottomRight
  • Implement geometry() handling for the new modes using half-width and half-height rectangles
src/surface/quicktile.h
src/surface/quicktile.cpp
Detect corner tiling based on cursor position near screen edges using configurable quadrant zone ratio.
  • Read edgeQuadrantZoneRatio from configuration and derive vertical boundaries for quadrant zones
  • Update edge-tiling detection on left/right edges to select corner modes when cursor is in top/bottom quadrant bands
  • Ensure sampling logic for delay/preview respects the new corner modes
  • Clarify that top edge only triggers maximize, with quadrant zones reserved for side edges
src/core/rootsurfacecontainer.cpp
misc/dconfig/org.deepin.dde.treeland.user.json

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

glyvut added 2 commits August 20, 2026 21:19
Add TopLeft/TopRight/BottomLeft/BottomRight edge tiling modes so
dragging to the corner zones of the left/right edges tiles to a
quarter of the screen. Add edgeQuadrantZoneRatio dconfig to tune
the corner trigger area ratio.

边缘平铺新增四分之一屏(角落象限)模式,光标位于左右边缘上下角落
区域时平铺到屏幕四分之一处,中间区域保持半屏平铺。新增
edgeQuadrantZoneRatio配置项控制角落触发区域比例。

Log: 支持四分之一屏边缘平铺
Influence: 边缘拖拽平铺新增角落象限模式,可平铺到屏幕四分之一区域。
Animate the edge tile preview so it smoothly grows from the dragged
surface's current geometry to the target tile area (250ms), mirroring
KWin's outline effect. Pass the seat to updateEdgeTilePreview to
obtain the source geometry.

边缘平铺预览增加动效:从被拖拽窗口的当前位置平滑动画过渡到目标
平铺区域(250ms),与KWin轮廓效果一致。updateEdgeTilePreview新增
seat参数以获取拖拽窗口的几何位置。

Log: 边缘平铺预览增加动效
Influence: 拖拽边缘预览时显示平滑过渡动画,视觉反馈更清晰。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants