fix: Avoid manual dock margins on Wayland#267
Merged
yixinshark merged 1 commit intoJun 11, 2026
Merged
Conversation
There was a problem hiding this comment.
Sorry @yixinshark, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
Wayland layer-shell surfaces should let the compositor account for Dock exclusive zones instead of converting Dock geometry in the client. - Skip Dock-size margin adjustments on Wayland while keeping the existing X11 margin path. - Set the layer-shell exclusive zone to 0 so Treeland can configure the surface against reserved Dock space. - Keep X11 behavior unchanged because the existing emulation already uses exclusive zone 0 and still applies manual Dock margins. Wayland 的 layer-shell 窗口应交由合成器根据 Dock 独占区域避让,而不是在客户端继续换算 Dock 几何。 - Wayland 下跳过 Dock 尺寸相关的边距叠加,保留现有 X11 边距处理路径。 - 将 layer-shell exclusive zone 设置为 0,让 Treeland 根据 Dock 预留空间配置窗口。 - X11 行为保持不变,因为现有模拟实现已经使用 exclusive zone 0,并仍会应用手动 Dock 边距。 Log: Avoid manual dock margins on Wayland Pms: BUG-294811 Change-Id: I209d3044dbbef22afe010a99868cc1ce52b8bc81
183c159 to
01337d3
Compare
deepin pr auto review这段代码涉及对剪贴板主窗口的修改,主要关注了Wayland和X11平台下的差异处理。我来分析一下这些变更:
if (!m_isWayland && m_daemonDockInter->hideState() != 2 && (window() && window()->screen()->geometry().contains(dockGeometry))) {改进建议:
if (!m_isWayland && dockGeometry.width() > 0 && dockGeometry.height() > 0) {改进建议:
// 旧代码
layerShellWnd->setExclusiveZone(m_isWayland ? -1 : 0);
// 新代码
layerShellWnd->setExclusiveZone(0);改进建议:
总体建议:
这些修改看起来是为了更好地支持Wayland环境,同时保持与X11的兼容性。整体方向是正确的,但可以通过更好的代码组织和注释来提高可维护性。 |
18202781743
approved these changes
Jun 11, 2026
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, yixinshark 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 |
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
Test Plan