fix: prevent app list item overlap after drag on Wayland#775
Open
yixinshark wants to merge 1 commit into
Open
Conversation
In category and name sorting modes, the windowed app list should not reorder items when an item is dragged. On Wayland/Treeland, using the visible ItemDelegate itself as the MouseArea drag target can leave the delegate at a dragged offset after release, causing it to overlap with other list items. Use a dummy invisible Item as the drag target in AppListView so the platform drag operation can still start for dock pinning, while the real delegate remains under ListView layout control. 在按分类和按名称排序模式下,窗口模式左侧应用列表不应通过拖拽改变位置。 在 Wayland/Treeland 环境中,如果直接把可见的 ItemDelegate 作为 MouseArea 的拖拽目标,释放后 delegate 可能停留在拖拽偏移位置,导致与其他列表项重叠。 在 AppListView 中改用不可见的 dummy Item 作为拖拽目标,保留拖到 Dock 的 平台拖拽能力,同时让真实 delegate 继续由 ListView 布局管理。 Log: prevent app list item overlap after drag on Wayland Pms: BUG-295171 Change-Id: Ie8df5b75712b552d755a164c59053f518e5a8313
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdjusts the Wayland drag behavior in the windowed app list so that drag operations use an invisible dummy item as the drag target, preserving the layout of the visible ItemDelegate and preventing item overlap after drag. Sequence diagram for Wayland drag using dummy Item targetsequenceDiagram
actor User
participant MouseArea
participant dndTarget
participant ItemDelegate
participant WaylandCompositor
User->>MouseArea: pressAndHold
MouseArea->>MouseArea: startDrag
MouseArea->>dndTarget: set drag.target
MouseArea->>WaylandCompositor: initiateDrag(dndTarget)
Note over ItemDelegate,WaylandCompositor: ItemDelegate remains under ListView layout control
User->>MouseArea: release
WaylandCompositor-->>MouseArea: drop
MouseArea->>ItemDelegate: updateModelOrder
Note over ItemDelegate: No visual overlap after drag on Wayland
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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
cmake --build /tmp/dde-launchpad-build.Pms: BUG-295171
Summary by Sourcery
Bug Fixes: