Skip to content

fix(layershell): stabilize compositor interactive resize (u3) - #1845

Merged
wjyrich merged 1 commit into
linuxdeepin:develop/2500u3from
wjyrich:backport/1841-develop-2500u3
Nov 24, 2026
Merged

wjyrich merged 1 commit into
linuxdeepin:develop/2500u3from
wjyrich:backport/1841-develop-2500u3

Conversation

@wjyrich

@wjyrich wjyrich commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Backport #1841 to develop/2500u3 to stabilize compositor-driven dock resizing.

Move the Treeland layer-shell extension into the shared frame component and drive dock resizing through Qt's system resize API. Synchronize configure handling, resize state and final dock size to avoid geometry feedback loops and jumps when dragging ends.

Source commit: d86bbe13818fca7462cd30d05090e61c8afb6715.
Cherry-picked with -x without conflicts; the stable patch ID matches the source commit.

Validation:

  • git diff --check upstream/develop/2500u3...HEAD: passed.
  • CMake configuration with Qt 6 and BUILD_TESTING=ON: passed.
  • dockpanel build, including dde-shell-frame and dde-shell-dock: passed.
  • Qt 6 qmlformat parsing of panels/dock/package/main.qml: passed.
  • Runtime dock loading, interactive resizing and multi-monitor behavior in a Treeland session were not tested.

将 #1841 无冲突回移到 develop/2500u3:把 Treeland 缩放协议实现下沉到 frame,由 Qt 系统缩放接口驱动任务栏拖拽,并同步 configure、缩放状态和最终尺寸。补丁与原提交一致;相关目标编译、QML 语法和空白检查均通过,Treeland 会话中的运行时行为尚未验证。

Log: 稳定合成器驱动的任务栏交互式缩放
Influence: 避免任务栏拖拽结束时尺寸跳动和循环缩放
PMS: BUG-295957

Summary by Sourcery

Stabilize interactive dock resizing by centralizing Treeland layer-shell support and synchronizing compositor configure handling with final dock geometry.

Bug Fixes:

  • Stabilize compositor-driven dock resizing to prevent size jumps and geometry feedback loops when interactive dragging ends.

Enhancements:

  • Move Treeland layer-shell resize integration into the shared frame component and use Qt system resize handling with synchronized configure and resize state.

Build:

  • Add Treeland layer-shell protocol discovery and generation to the shared frame build target.

Chores:

  • Remove the dock-specific layer-shell extension implementation and resize plumbing.

1. Add TreelandProtocols to the top-level build and generate the layer
shell extension protocol in frame
2. Introduce TreeLandLayerShellExtensionManager and extension object
wrappers in the frame module
3. Implement interactive resize in QWaylandLayerShellSurface via
QWaylandShellSurface::resize
4. Expose resizing state and resizeFinished signal on DLayerShellWindow
5. Avoid resize loops by skipping geometry echo during configure and
syncing layout on interactive resize
6. Remove the dock-local extension implementation and drive resize from
QML system resize

Log: Centralize compositor-driven layer surface resizing in the frame
module
Influence: Layer surfaces gain unified interactive resize support via
the shell surface API

refactor(layershell): 将 treeland 缩放能力下沉至图层壳表面

1. 顶层构建引入 TreelandProtocols,并在 frame 中生成图层壳扩展协议
2. 在 frame 模块新增 TreeLandLayerShellExtensionManager 及扩展对象封装
3. 通过 QWaylandShellSurface::resize 在 QWaylandLayerShellSurface 中实现
交互式缩放
4. 在 DLayerShellWindow 上暴露 resizing 状态与 resizeFinished 信号
5. configure 期间跳过几何回传并在交互缩放时同步布局,避免缩放循环
6. 移除 dock 内的扩展实现,改由 QML 系统缩放驱动

Log: 将合成器驱动的图层表面缩放能力统一收敛到 frame 模块
Influence: 图层表面通过壳表面接口获得统一的交互式缩放支持
PMS: BUG-295957
(cherry picked from commit d86bbe1)
@deepin-ci-robot

deepin-ci-robot commented Nov 24, 2026 •

Copy link
Copy Markdown

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

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

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

@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="798-800" />
<code_context>
+                const edge = Panel.position === Dock.Top ? Qt.BottomEdge
+                    : Panel.position === Dock.Bottom ? Qt.TopEdge
+                    : Panel.position === Dock.Left ? Qt.RightEdge : Qt.LeftEdge
+                if (!dock.startSystemResize(edge))
+                    finishResize()
+                return
             }
             DS.grabMouse(Panel.rootObject, true)
</code_context>
<issue_to_address>
**Dock resizing stops on other compositors**

When the dock runs on a non-XCB Wayland compositor where the Treeland resize extension is inactive, the failed system-resize request calls `finishResize()` and returns before the manual `DS.grabMouse` fallback; subsequent pointer movement is also ignored in compositor-driven mode, so dock resizing does not work.

Fall back to the manual drag path when `startSystemResize` returns false, or enable compositor-driven resizing only when the Treeland extension is available.
</issue_to_address>

### Comment 2
<location path="frame/layershell/qwaylandlayershellsurface.cpp" line_range="70-72" />
<code_context>

 QWaylandLayerShellSurface::~QWaylandLayerShellSurface()
 {
+    m_shellExtension.reset();
+    if (m_dlayerShellWindow)
+        m_dlayerShellWindow->setResizing(false);
     destroy();
 }
</code_context>
<issue_to_address>
**Final dock size is lost**

When the output changes while a resize is active and the latest configure has not yet been applied, the surface destructor clears the resizing state without calling `finishResize()`, so it never adopts `m_pendingSize` or emits `resizeFinished`. The QML resizing-state handler then persists the last reflected `dockSize`, which can be older than the final configure, and the recreated surface shows the wrong size.

Finalize and persist the pending resize size before destroying the shell surface during recreation.
</issue_to_address>

### Comment 3
<location path="panels/dock/package/main.qml" line_range="906" />
<code_context>
+            Applet.dockSize = dock.useColumnLayout ? size.width : size.height
+        }
+        function onResizingChanged() {
+            if (!dock.DLayerShellWindow.resizing && dock.isDragging) {
                 dragArea.finishResize()
             }
</code_context>
<issue_to_address>
**Final dock size gets overwritten**

When the last compositor configure has not yet updated `dockSize` when the resize-finished signals are handled, and `dockSize` is not bound to the updated `Applet.dockSize`, `finishResize()` runs after `resizeFinished` and writes `dockSize` back to `Applet.dockSize`; if `dockSize` no longer follows that property and Qt has not applied the last configure yet, this replaces the final compositor size with the older value the user sees and persists.

Use the final size from `resizeFinished` as the value saved by `finishResize`, or ensure the dock's displayed size is updated before that handler persists it.

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

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

Comment on lines +798 to +800
if (!dock.startSystemResize(edge))
finishResize()
return

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Medium · Dock resizing stops on other compositors

When the dock runs on a non-XCB Wayland compositor where the Treeland resize extension is inactive, the failed system-resize request calls finishResize() and returns before the manual DS.grabMouse fallback; subsequent pointer movement is also ignored in compositor-driven mode, so dock resizing does not work.

Fall back to the manual drag path when startSystemResize returns false, or enable compositor-driven resizing only when the Treeland extension is available.

Prompt for AI agents
In `panels/dock/package/main.qml` at lines 798-800:

**Dock resizing stops on other compositors**

When the dock runs on a non-XCB Wayland compositor where the Treeland resize extension is inactive, the failed system-resize request calls `finishResize()` and returns before the manual `DS.grabMouse` fallback; subsequent pointer movement is also ignored in compositor-driven mode, so dock resizing does not work.

Fall back to the manual drag path when `startSystemResize` returns false, or enable compositor-driven resizing only when the Treeland extension is available.

Comment on lines +70 to +72
m_shellExtension.reset();
if (m_dlayerShellWindow)
m_dlayerShellWindow->setResizing(false);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Medium · Final dock size is lost

When the output changes while a resize is active and the latest configure has not yet been applied, the surface destructor clears the resizing state without calling finishResize(), so it never adopts m_pendingSize or emits resizeFinished. The QML resizing-state handler then persists the last reflected dockSize, which can be older than the final configure, and the recreated surface shows the wrong size.

Finalize and persist the pending resize size before destroying the shell surface during recreation.

Prompt for AI agents
In `frame/layershell/qwaylandlayershellsurface.cpp` at lines 70-72:

**Final dock size is lost**

When the output changes while a resize is active and the latest configure has not yet been applied, the surface destructor clears the resizing state without calling `finishResize()`, so it never adopts `m_pendingSize` or emits `resizeFinished`. The QML resizing-state handler then persists the last reflected `dockSize`, which can be older than the final configure, and the recreated surface shows the wrong size.

Finalize and persist the pending resize size before destroying the shell surface during recreation.

Applet.dockSize = dock.useColumnLayout ? size.width : size.height
}
function onResizingChanged() {
if (!dock.DLayerShellWindow.resizing && dock.isDragging) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Medium · Final dock size gets overwritten

When the last compositor configure has not yet updated dockSize when the resize-finished signals are handled, and dockSize is not bound to the updated Applet.dockSize, finishResize() runs after resizeFinished and writes dockSize back to Applet.dockSize; if dockSize no longer follows that property and Qt has not applied the last configure yet, this replaces the final compositor size with the older value the user sees and persists.

Use the final size from resizeFinished as the value saved by finishResize, or ensure the dock's displayed size is updated before that handler persists it.

Also at panels/dock/package/main.qml:903.

Prompt for AI agents
In `panels/dock/package/main.qml` at line 906:

**Final dock size gets overwritten**

When the last compositor configure has not yet updated `dockSize` when the resize-finished signals are handled, and `dockSize` is not bound to the updated `Applet.dockSize`, `finishResize()` runs after `resizeFinished` and writes `dockSize` back to `Applet.dockSize`; if `dockSize` no longer follows that property and Qt has not applied the last configure yet, this replaces the final compositor size with the older value the user sees and persists.

Use the final size from `resizeFinished` as the value saved by `finishResize`, or ensure the dock's displayed size is updated before that handler persists it.

Also at `panels/dock/package/main.qml:903`.

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