Repository navigation
fix(dock): sync the work area after Wayland resize - #1802
Conversation
Reviewer's GuideImplementationKeep tracking compositor-driven dock size changes after resizing ends, persist the dock’s orientation-appropriate dimension, and update the applet size while animations are inactive.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 2 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="865" />
<code_context>
Connections {
target: dock
- enabled: dock.compositorDrivenResize && Applet.isResizing
+ enabled: dock.compositorDrivenResize
function onWidthChanged() {
if (dock.useColumnLayout) {
</code_context>
<issue_to_address>
**Animated size changes persist**
When a Wayland or compositor-driven Dock above its minimum size runs a hide or position-change animation, `onWidthChanged` and `onHeightChanged` write each intermediate dimension to `Applet.dockSize`; accepted sizes overwrite the saved value, so the Dock reopens smaller.
Prevent these geometry handlers from updating `Applet.dockSize` during hide and position-change animations, such as by gating them on `Applet.isResizing`.
Also at `panels/dock/package/main.qml:868`, `panels/dock/package/main.qml:874-875`.
</issue_to_address>
### Comment 2
<location path="panels/dock/package/main.qml" line_range="868" />
<code_context>
function onWidthChanged() {
if (dock.useColumnLayout) {
- dock.dockSize = dock.width
+ Applet.dockSize = dock.width
}
}
</code_context>
<issue_to_address>
**Stale drag size wins**
When a client requests a new Dock size before delayed geometry from an earlier compositor-driven drag arrives, `onWidthChanged` and `onHeightChanged` write the stale geometry to `Applet.dockSize`, overwriting the newer request; the caller's setting reverts and the exclusive zone follows the stale size.
Ignore geometry updates from an earlier drag when a newer Dock size request has superseded them.
Also at `panels/dock/package/main.qml:875`.
</issue_to_address>cdf4020 to
25b2c5b
Compare
1. Keep listening for Dock geometry changes after the drag ends. 2. Write the width for vertical docks and the height for horizontal docks to the saved Dock size. 3. Let the existing exclusive zone binding pick up late size changes. Log: Keep the work area in sync when the Dock is resized on Wayland. fix(dock): 修复 Wayland 下拖动 Dock 后工作区未同步 1. 拖动结束后继续监听 Dock 窗口尺寸变化。 2. 竖向 Dock 保存宽度,横向 Dock 保存高度。 3. 让现有独占区绑定跟随松手后才生效的尺寸。 Log: Wayland 下调整 Dock 大小时同步更新工作区。
25b2c5b to
a6f7b5e
Compare
deepin pr auto review🤖 AI 代码审查报告📊 总体评价
🔍 详细分析1. 语法逻辑 ✅评价: 语法正确,逻辑清晰 ✅ 通过 潜在问题: 建议: [] 2. 代码质量 ✅评价: 代码结构清晰,注释完整 ✅ 通过 潜在问题: 建议: [] 3. 代码性能 ✅评价: 性能良好,资源使用合理 ✅ 通过 潜在问题: 建议: [] 4. 代码安全 🔒评价: 存在0个安全漏洞 ✅ 通过
安全漏洞详情: 建议: [] 💡 改进建议代码示例本报告由 AI 代码审查工具自动生成 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: gugullll, zccrs 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 |
Log: Keep the work area in sync when the Dock is resized on Wayland.
fix(dock): 修复 Wayland 下拖动 Dock 后工作区未同步
Log: Wayland 下调整 Dock 大小时同步更新工作区。
Summary by Sourcery
Synchronize Dock geometry and work-area sizing after Wayland resizes.
Bug Fixes:
Enhancements: