Repository navigation
Conversation
1. When margins push an X11 layer shell window completely off its screen, Qt reassigns it to the neighbouring screen and positioning re-enters with the new origin, ping-ponging between screens forever and freezing dde-shell (e.g. moving the dock to the left on dual screens with 125% scaling). 2. After the final geometry is computed (including opposite anchors), move an axis back only when the window center leaves the current screen on that axis, matching how Qt picks the window's screen; a window larger than the screen is centered on it. Intentional partial overlap such as the full-height notification bubble avoiding the dock is preserved. Influence: 1. On dual screens with scaling, switch the dock between bottom, left, top and right from the context menu; dde-shell must not freeze 2. Open and close the windowed launcher on primary and secondary screens 3. With the dock at the bottom or right, send a notification and verify it does not overlap the dock fix: X11 下 layer shell 窗口保持在所在屏幕 1. 边距把 X11 layer shell 窗口完全推出所在屏幕时,Qt 会把窗口改归相邻屏幕, 定位逻辑以新屏幕原点再次进入,在两块屏幕间反复切换,导致 dde-shell 卡死 (如双屏 125% 缩放下将任务栏切到左侧) 2. 在最终几何(含两侧锚定)计算完成后,仅当窗口中心在某一轴上离开当前屏幕时 才把该轴拉回,与 Qt 按中心点判定所属屏幕一致;比屏幕大的窗口居中于当前屏幕。 保留通知气泡等有意的部分越界以避让任务栏 Influence: 1. 双屏缩放环境下通过右键菜单在底部、左侧、顶部、右侧间切换任务栏位置,dde-shell 不卡死 2. 在主副屏打开、关闭窗口模式启动器 3. 任务栏位于底部或右侧时发送通知,确认通知不与任务栏重叠 Log: 修复双屏缩放下切换任务栏位置导致界面卡死的问题 PMS: BUG-384699 (cherry picked from commit a4bc0f0)
Reviewer's GuideImplementationAfter computing the layer-shell geometry, keep its center within the current screen on any axis where it falls outside, centering oversized windows while preserving intentional partial overlap.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="frame/layershell/x11dlayershellemulation.cpp" line_range="235" />
<code_context>
+ return qBound(screenStart, pos, screenStart + screenSize - size);
+ };
+ const QPoint center = rect.center();
+ if (center.x() < screenRect.left() || center.x() > screenRect.right()) {
+ rect.moveLeft(keepOnScreen(rect.left(), rect.width(), screenRect.left(), screenRect.width()));
+ }
</code_context>
<issue_to_address>
**Oversized windows stay edge-aligned**
When an anchored window is wider or taller than its screen, but its center remains inside the screen, `onPositionChanged()` only calls `keepOnScreen` when the center is outside `screenRect`, so it skips repositioning the oversized window and leaves it edge-aligned instead of centered; callers see an off-center window.
Also center each axis when the window dimension exceeds the screen dimension, regardless of whether its center lies inside `screenRect`.
Also at `frame/layershell/x11dlayershellemulation.cpp:238-239`.
</issue_to_address>
|
wjyrich
approved these changes
Nov 27, 2026
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: robertkill, wjyrich 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.
Cherry-pick commit a4bc0f0 to
develop/2500u3.Source pull request #1894
On X11, when layer-shell margins push a window completely off its screen (e.g. moving the dock to the left on dual screens with 125% scaling), Qt reassigns it to the neighbouring screen and positioning re-enters forever, freezing dde-shell. After the final geometry is computed, move an axis back only when the window center leaves the current screen on that axis; a window larger than the screen is centered on it.
修复双屏缩放下切换任务栏位置时 layer shell 窗口在两屏间反复切换导致 dde-shell 卡死的问题。
Cherry-picked without conflicts; the patch is identical to the original (1 file, +16).
Validation:
develop/2500u3+ this patch: no warnings in the changed file; CTest on this branch: 300 passed, 1 pre-existing disabled.PMS: BUG-384699
Summary by Sourcery
Prevent X11 layer-shell windows from oscillating between screens and freezing dde-shell during multi-screen positioning changes.
Bug Fixes: