Skip to content

fix(workspace): prevent window titlebar from being obscured by dock#1028

Draft
deepin-wm wants to merge 1 commit into
linuxdeepin:masterfrom
deepin-wm:fix/exclusive-zone-titlebar-obscured
Draft

fix(workspace): prevent window titlebar from being obscured by dock#1028
deepin-wm wants to merge 1 commit into
linuxdeepin:masterfrom
deepin-wm:fix/exclusive-zone-titlebar-obscured

Conversation

@deepin-wm

Copy link
Copy Markdown
Contributor

Summary

When the dock/panel height increases, the exclusive zone may not cover the actual surface dimensions including margins, causing the dock to overlap with window titlebars. Additionally, when layer surface dimensions change without the exclusive zone value changing, non-layer surfaces are not re-arranged.

Changes

  1. effectiveZone computation: In arrangeLayerSurface(), compute effectiveZone as max(exclusiveZone, surfaceDimension + margin) to ensure the exclusive zone covers the actual layer surface size including margins.

  2. layerSizeChanged detection: In arrangeLayerSurfaces(), save old sizes of layer surfaces before re-arrangement and compare with new sizes after. Use pixel-level comparison (qAbs > 0.5) to detect meaningful size changes and trigger arrangeNonLayerSurfaces() even when the exclusive zone value hasn't changed.

  3. Signal decoupling: Emit exclusiveZoneChanged() signal only when the exclusive zone actually changes, not when only layer sizes change.

Fixes #BUG-344911

@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

@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.

Sorry @deepin-wm, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@deepin-ci-robot

Copy link
Copy Markdown

[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.

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

1. Compute effectiveZone as max(exclusiveZone,
   surfaceDimension + margin) in arrangeLayerSurface()
   to ensure exclusive zone covers actual layer surface
   size including margins
2. Add layerSizeChanged detection in
   arrangeLayerSurfaces() to trigger
   arrangeNonLayerSurfaces() when layer surface
   dimensions change even if exclusive zone value
   stays the same
3. Use pixel-level comparison (qAbs > 0.5) for
   floating-point size difference checks to avoid
   missed updates from floating-point drift

Log: Fixed dock overlapping window titlebar by ensuring
exclusive zone covers actual surface dimensions and
triggering re-layout on size changes

Influence:
1. Test dock height changes with maximized and normal windows
2. Verify windows are pushed aside when dock grows larger
3. Test dock on all four screen edges (top, bottom, left, right)
4. Verify dock with margins set via layer-shell protocol

fix(workspace): 防止dock遮挡窗口标题栏

1. 在arrangeLayerSurface()中计算effectiveZone为
   max(exclusiveZone, surfaceDimension + margin),
   确保独占区域覆盖包含边距的实际
   layer surface尺寸
2. 在arrangeLayerSurfaces()中增加layerSizeChanged
   检测,当layer surface尺寸变化但exclusive zone
   值未变时也触发arrangeNonLayerSurfaces()重排
3. 浮点数尺寸比较使用像素级阈值(qAbs > 0.5),
   避免浮点漂移导致更新遗漏

Log: 修复dock遮挡窗口标题栏问题,确保独占区域覆盖
实际surface尺寸并在尺寸变化时触发重排

Influence:
1. 测试dock高度变化时最大化窗口和普通窗口的行为
2. 验证dock增大时窗口被正确推移
3. 测试dock在屏幕四个边(上、下、左、右)的表现
4. 验证通过layer-shell协议设置边距的dock行为

PMS: BUG-344911
@deepin-wm deepin-wm force-pushed the fix/exclusive-zone-titlebar-obscured branch from f00dd0a to adb7821 Compare June 18, 2026 13:49
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