Skip to content

fix(dock): fix window size and radius during dock animation - #1846

Merged
wjyrich merged 1 commit into
linuxdeepin:masterfrom
wjyrich:fix-bug-384075
Nov 24, 2026
Merged

wjyrich merged 1 commit into
linuxdeepin:masterfrom
wjyrich:fix-bug-384075

Conversation

@wjyrich

@wjyrich wjyrich commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor
  1. Relax minimum window size while idle and preserve full-size constraints only during dragging
  2. Allow the fashion dock to resize horizontally during animation
  3. Reset the window radius during xcb hide/show animation to avoid whole-window blur
  4. Enable transform-based animation for the fashion dock on xcb
  5. Keep the dock protocol size in physical pixels for plugin layout

Log: Fix dock window sizing and rounded corners during show/hide animation
Influence: Fashion dock show/hide is smoother with correct size and corners

fix(dock): 修复任务栏动画时的窗口尺寸与圆角问题

  1. 非拖拽状态下放宽窗口最小尺寸限制,仅在拖拽时保持完整尺寸约束
  2. 允许时尚模式下任务栏在动画期间横向调整大小
  3. xcb 平台隐藏/显示动画期间重置窗口圆角,避免全窗口模糊
  4. 在 xcb 平台为时尚任务栏启用基于变换的动画
  5. 保持插件布局使用物理像素的协议尺寸

Log: 修复任务栏显示/隐藏动画时的窗口尺寸与圆角问题
Influence: 时尚模式任务栏动画更流畅,尺寸与圆角显示正确
PMS: BUG-384075

Summary by Sourcery

Improve dock show and hide animations by correcting window sizing, resizing behavior, and rounded-corner rendering.

Bug Fixes:

  • Fix dock window sizing and rounded-corner behavior during show/hide animations, particularly on XCB.

Enhancements:

  • Allow the fashion dock to resize during animation and use transform-based animation on XCB.
  • Relax idle minimum-size constraints while preserving full sizing during drag operations.
  • Keep dock protocol dimensions in physical pixels for plugin layout.

@sourcery-ai

sourcery-ai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

UI

Relax idle window minimum dimensions, permit fashion-dock width shrinkage, and animate the dock with transforms on xcb so it can resize smoothly while hiding or showing.

  • panels/dock/package/main.qml L119-122, L215

Clear the xcb window radius while show/hide or transform animation is in progress to avoid KWin applying blur to the whole window, then restore the configured radius.

  • panels/dock/package/main.qml L160-173

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

1. Relax window minimum size to 1 unless dragging so the dock can shrink
while hiding.
2. Allow minimum width to shrink when fashion dock mode is enabled.
3. Reset window radius to 0 on xcb during hide/show animations to avoid
KWin whole-window blur.
4. Enable transform-based animation on xcb regardless of fashion dock
mode.

Log: Fix dock window size and radius handling during hide/show
animations
Influence: Smoother dock animations without blur artifacts on xcb

fix(dock): 修复动画过程中窗口尺寸与圆角处理

1. 窗口最小尺寸在非拖拽时放宽为 1,使停靠栏隐藏时可收缩。
2. 时尚模式启用时允许最小宽度收缩。
3. xcb 下隐藏/显示动画期间将窗口圆角重置为 0,避免 KWin 整窗模糊。
4. xcb 下无论是否开启时尚模式都启用基于变换的动画。

Log: 修复停靠栏隐藏/显示动画期间的窗口尺寸与圆角处理
Influence: xcb 下停靠栏动画更流畅且无模糊残影
PMS: TASK-384075

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 3 issues

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="panels/dock/package/main.qml" line_range="215" />
<code_context>
         id: hideShowAnimation;
         // Currently, Wayland (Treeland) doesn't support StyledBehindWindowBlur inside the window, thus we keep using the window size approach on Wayland
-        property bool useTransformBasedAnimation: Qt.platform.pluginName === "xcb" && !fashionDock.enabled
+        property bool useTransformBasedAnimation: Qt.platform.pluginName === "xcb"
         property bool hiding: false
         target: useTransformBasedAnimation ? dockTransform : dock;
</code_context>
<issue_to_address>
**Clicks are intercepted by the hidden dock window**

When an xcb fashion dock is hiding or showing and a click lands in the area vacated by the moving dock content, `hideShowAnimation` moves `dockContainer` but leaves the native window and its input region at the old geometry until the animation stops and hides it, so clicks in the vacated area are consumed instead of reaching the window underneath.

Keep the native window's input region aligned with the moving dock content throughout the animation.
</issue_to_address>

### Comment 2
<location path="panels/dock/package/main.qml" line_range="1092-1098" />
<code_context>
         DockCompositor.dockSize = Qt.binding(function(){
             return Qt.size(Panel.frontendWindowRect.width, Panel.frontendWindowRect.height)
+
+            // Plugin layout uses the configured thickness, not the window's
+            // animated hide/show size. Keep the protocol size in physical pixels.
+            //const thickness = Math.round(dock.dockSize * Panel.devicePixelRatio)
+            //return dock.useColumnLayout
+              //  ? Qt.size(thickness, Panel.frontendWindowRect.height)
+               // : Qt.size(Panel.frontendWindowRect.width, thickness)
         })

         // 插件需要知道任务栏是否处于时尚模式,例如时间日期插件在时尚模式下
</code_context>
<issue_to_address>
**Plugin layouts resize during dock animation**

When a non-xcb dock is hiding or showing with the size-based animation, `DockCompositor.dockSize` publishes the live `Panel.frontendWindowRect`, and `PluginManager` sends the shrinking dimension through `dockPanelSizeChanged`, so plugins receive an animated size instead of the configured thickness and their layouts reflow or collapse.

Publish the configured dock size to plugins instead of the live window geometry during the animation.

Also at `panels/dock/package/main.qml:119`.
</issue_to_address>

### Comment 3
<location path="panels/dock/package/main.qml" line_range="215" />
<code_context>
         id: hideShowAnimation;
         // Currently, Wayland (Treeland) doesn't support StyledBehindWindowBlur inside the window, thus we keep using the window size approach on Wayland
-        property bool useTransformBasedAnimation: Qt.platform.pluginName === "xcb" && !fashionDock.enabled
+        property bool useTransformBasedAnimation: Qt.platform.pluginName === "xcb"
         property bool hiding: false
         target: useTransformBasedAnimation ? dockTransform : dock;
</code_context>
<issue_to_address>
**Position changes still resize windows**

When an xcb fashion dock changes between the top and bottom positions, `dockAnimation` still disables transform-based animation for fashion mode, so moving an xcb fashion dock between its supported top and bottom positions animates the window height rather than translating the dock. The fashion dock therefore does not use transform-based animation for this position-change path.

Enable transform-based animation for fashion mode in `dockAnimation` as well, and ensure its transform direction follows the position being animated.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread panels/dock/package/main.qml Resolved
Comment thread panels/dock/package/main.qml Resolved
Comment thread panels/dock/package/main.qml Resolved
@deepin-ci-robot

Copy link
Copy Markdown

⚠️ OBS CI 构建警告日志 (Commit: 1959365d)

提示:以下为 OBS CI 构建中 Lintian 检测到的警告信息,默认折叠,点击展开查看详情。完整日志请参阅对应构建状态链接。

deepin_develop / x86_64 (Lintian 警告: 15 条)
[  319s] W: dde-shell: desktop-command-not-in-package bin/false [usr/share/applications/org.deepin.dde-shell.desktop]
[  319s] N: 
[  319s] N:   The desktop entry specifies a Command that does not match any of the
[  319s] N:   executables shipped in the package.
[  319s] N:   
[  319s] N:   This condition is often caused by a typo, or the desktop file was not
[  319s] N:   updated after the installed path of the executable was modified.
[  319s] N:   
[  319s] N:   Packages should ship executables that are used as commands in desktop
[  319s] N:   files.
[  319s] N: 
[  319s] N:   Visibility: warning
[  319s] N:   Show-Always: no
[  319s] N:   Check: menu-format
[  319s] N: 
[  319s] N:
[  319s] W: dde-shell: link-to-shared-library-in-wrong-package usr/lib/x86_64-linux-gnu/libds-notification-shared.so.2.0.61 [usr/lib/x86_64-linux-gnu/libds-notification-shared.so]
[  319s] N: 
[  319s] N:   Although this package is not a "-dev" package, it installs a
[  319s] N:   "libsomething.so" symbolic link referencing the corresponding shared
[  319s] N:   library. When the link doesn't include the version number, it is used by
[  319s] N:   the linker when other programs are built against this shared library.
[  319s] N:   
[  319s] N:   Shared libraries are supposed to place such symbolic links in their
[  319s] N:   respective "-dev" packages, so it is a bug to include it with the main
[  319s] N:   library package.
[  319s] N:   
[  319s] N:   However, if this is a small package which includes the runtime and the
[  319s] N:   development libraries, this is not a bug. In the latter case, please
[  319s] N:   override this warning.
[  319s] N: 
[  319s] N:   Please refer to Development files (Section 8.4) in the Debian Policy
[  319s] N:   Manual for details.
[  319s] N: 
[  319s] N:   Visibility: warning
[  319s] N:   Show-Always: no
[  319s] N:   Check: libraries/shared/links
[  319s] N:   Renamed from: non-dev-pkg-with-shlib-symlink
[  319s] N: 
[  319s] N:
[  319s] W: dde-shell: no-manual-page [usr/bin/dde-shell]
[  319s] N: 
[  319s] N:   Each binary in /usr/bin, /usr/sbin, /bin, /sbin or /usr/games should have
[  319s] N:   a manual page
[  319s] N:   
[  319s] N:   Note that though the man program has the capability to check for several
[  319s] N:   program names in the NAMES section, each of these programs should have its
[  319s] N:   own manual page (a symbolic link to the appropriate manual page is
[  319s] N:   sufficient) because other manual page viewers such as xman or tkman don't
[  319s] N:   support this.
[  319s] N:   
[  319s] N:   If the name of the manual page differs from the binary by case, man may be
[  319s] N:   able to find it anyway; however, it is still best practice to match the
[  319s] N:   exact capitalization of the executable in the manual page.
[  319s] N:   
[  319s] N:   If the manual pages are provided by another package on which this package
[  319s] N:   depends, Lintian may not be able to determine that manual pages are
[  319s] N:   available. In this case, after confirming that all binaries do have manual
[  319s] N:   pages after this package and its dependencies are installed, please add a
[  319s] N:   Lintian override.
[  319s] N: 
[  319s] N:   Please refer to Manual pages (Section 12.1) in the Debian Policy Manual
[  319s] N:   for details.
[  319s] N: 
[  319s] N:   Visibility: warning
[  319s] N:   Show-Always: no
[  319s] N:   Check: documentation/manual
[  319s] N:   Renamed from: binary-without-manpage
[  319s] N: 
[  319s] N:
[  319s] W: dde-shell source: no-nmu-in-changelog [debian/changelog:1]
[  319s] N: 
[  319s] N:   When you NMU a package, that fact should be mentioned on the first line in
[  319s] N:   the changelog entry. Use the words "NMU" or "Non-maintainer upload" (case
[  319s] N:   insensitive).
[  319s] N:   
[  319s] N:   Maybe you didn't intend this upload to be a NMU, in that case, please
[  319s] N:   double-check that the most recent entry in the changelog is byte-for-byte
[  319s] N:   identical to the maintainer or one of the uploaders. If this is a local
[  319s] N:   package (not intended for Debian), you can suppress this warning by
[  319s] N:   putting "local" in the version number or "local package" on the first line
[  319s] N:   of the changelog entry.
[  319s] N: 
[  319s] N:   Please refer to Using the DELAYED/ queue (Section 5.11.3) in the Debian
[  319s] N:   Developer's Reference for details.
[  319s] N: 
[  319s] N:   Visibility: warning
[  319s] N:   Show-Always: no
[  319s] N:   Check: nmu
[  319s] N:   Renamed from: changelog-should-mention-nmu
[  319s] N: 
[  319s] N:
[  319s] W: dde-shell: package-name-doesnt-match-sonames libds-notification-shared2
[  319s] N: 
[  319s] N:   The package name of a library package should usually reflect the soname of
[  319s] N:   the included library. The package name can determined from the library
[  319s] N:   file name with the following code snippet:
[  319s] N:   
[  319s] N:    $ objdump -p /path/to/libfoo-bar.so.1.2.3 | sed -n -e's/^[[:space:]]*SONAME[[:space:]]*//p' | \
[  319s] N:        sed -r -e's/([0-9])\.so\./\1-/; s/\.so(\.|$)//; y/_/-/; s/(.*)/\L&/'
[  319s] N: 
[  319s] N:   Visibility: warning
[  319s] N:   Show-Always: no
[  319s] N:   Check: libraries/shared/soname
[  319s] N: 
[  319s] N:
[  319s] W: libdde-shell: package-name-doesnt-match-sonames libdde-shell1
[  319s] N:
[  319s] W: libdde-shell-dock: package-name-doesnt-match-sonames libdde-shell-dock1
[  319s] N:
[  319s] W: dde-shell source: source-nmu-has-incorrect-version-number 2.0.61+u039 [debian/changelog:1]
[  319s] N: 
[  319s] N:   A source NMU should have a Debian revision of "-x.x" (or "+nmuX" for a
[  319s] N:   native package). This is to prevent stealing version numbers from the
[  319s] N:   maintainer.
[  319s] N:   
[  319s] N:   Maybe you didn't intend this upload to be a NMU, in that case, please
[  319s] N:   double-check that the most recent entry in the changelog is byte-for-byte
[  319s] N:   identical to the maintainer or one of the uploaders. If this is a local
[  319s] N:   package (not intended for Debian), you can suppress this warning by
[  319s] N:   putting "local" in the version number or "local package" on the first line
[  319s] N:   of the changelog entry.
[  319s] N: 
[  319s] N:   Please refer to NMUs and debian/changelog (Section 5.11.2) in the Debian
[  319s] N:   Developer's Reference for details.
[  319s] N: 
[  319s] N:   Visibility: warning
[  319s] N:   Show-Always: no
[  319s] N:   Check: nmu
[  319s] N: 
[  319s] N:
[  319s] W: dde-shell: unknown-section DDE
[  319s] N: 
[  319s] N:   The "Section:" field in this package's control file is not one of the
[  319s] N:   sections in use on the ftp archive. Valid sections are currently admin,
[  319s] N:   comm, cli-mono, database, debug, devel, doc, editors, electronics,
[  319s] N:   embedded, fonts, games, gnome, gnu-r, gnustep, graphics, hamradio,
[  319s] N:   haskell, httpd, interpreters, java, javascript, kde, libdevel, libs, lisp,
[  319s] N:   localization, kernel, mail, math, misc, net, news, ocaml, oldlibs,
[  319s] N:   otherosfs, perl, php, python, ruby, rust, science, shells, sound, tex,
[  319s] N:   text, utils, vcs, video, web, x11, xfce, zope.
[  319s] N:   
[  319s] N:   The section name should be preceded by either "contrib/", "non-free/" or
[  319s] N:   "non-free-firmware/" if the package is in the according archive area.
[  319s] N: 
[  319s] N:   Please refer to Sections (Section 2.4) in the Debian Policy Manual for
[  319s] N:   details.
[  319s] N: 
[  319s] N:   Visibility: warning
[  319s] N:   Show-Always: no
[  319s] N:   Check: fields/section
[  319s] N: 
[  319s] N:
[  319s] W: dde-shell-example: unknown-section DDE
[  319s] N:
[  319s] W: libdde-shell: unknown-section DDE
[  319s] N:
[  319s] W: libdde-shell-dev: unknown-section DDE
[  319s] N:
[  319s] W: libdde-shell-dock: unknown-section DDE
[  319s] N:
[  319s] W: libdde-shell-dock-dev: unknown-section DDE
[  319s] Warning: mkbaselibs missing in build root, skipping baselibs

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: BLumia, wjyrich

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

@wjyrich
wjyrich merged commit 6747803 into linuxdeepin:master Nov 24, 2026
11 of 13 checks passed
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.

3 participants