fix(workspace): prevent window titlebar from being obscured by dock#1028
Draft
deepin-wm wants to merge 1 commit into
Draft
fix(workspace): prevent window titlebar from being obscured by dock#1028deepin-wm wants to merge 1 commit into
deepin-wm wants to merge 1 commit into
Conversation
|
Skipping CI for Draft Pull Request. |
There was a problem hiding this comment.
Sorry @deepin-wm, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
|
[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. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
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
f00dd0a to
adb7821
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
effectiveZone computation: In
arrangeLayerSurface(), compute effectiveZone asmax(exclusiveZone, surfaceDimension + margin)to ensure the exclusive zone covers the actual layer surface size including margins.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 triggerarrangeNonLayerSurfaces()even when the exclusive zone value hasn't changed.Signal decoupling: Emit
exclusiveZoneChanged()signal only when the exclusive zone actually changes, not when only layer sizes change.Fixes #BUG-344911