This directly follows BUG 495444 and https://invent.kde.org/plasma/kwin/-/commit/2e0b33eae4588a829e64495efbb27a25da311190 SUMMARY With the Overview's Desktop Bar being addressed in the previous case, the fix to WindowHeapDelegate.qml regressed window placement on the expanded Desktop Grid in the Overview effect. Windows dragged into the target desktops stop animating and do not ease into their defined position. Can reproduce on X11 and Wayland with 4 desktops in 2x2 grid, recordings attached. STEPS TO REPRODUCE 1. Sign into new session (X11/Wayland) 2. Engage Overview (Meta+W) and add four Virtual Desktops in the Desktop Bar. 3. In Virtual Desktop KCM, increase Row count to 2. 3. Drag and drop a window to any desktop using the expanded Desktop Grid. 4. Observe the window behavior, where the dropped windows do not animate when they should. OBSERVED RESULT Windows stop animating when dropped in the Desktop Grid. EXPECTED RESULT Windows should "ease" over to their designated place. SOFTWARE/OS VERSIONS KDE Plasma Version: master branch KDE Frameworks Version: 6.7.0 Qt Version: 6.8.0 ADDITIONAL INFORMATION I tried to move the code fix from WindowHeapDelegate.qml to DesktopBar.qml (in DropArea) or main.qml of Overview, but realized rather quick it doesn't work this way, the behavior is driven here by WindowHeapDelegate. I then tried to restrict the fix using an extra if() check in WindowHeapDelegate.qml to only apply to windows dropped in the Desktop Bar's container, but I don't think this is possible due to the QML context not being nested as parent/child. I'm reading in general that chaining contexts like this is not best practice, anyway.
Created attachment 176089 [details] Normal behavior of the desktop grid
Created attachment 176090 [details] Abnormal behavior of the desktop grid
Adding Nate and Marco to CC, thanks y'all!
I had a look at the newly merged patch: This looks wrong: if (newGlobalRect.x < thumb.windowHeap.x || newGlobalRect.x is (presumably) global. windowHeap.x is relative to the parent of thumb.windowHeap That's mixing co-ordinate spaces.
https://invent.kde.org/plasma/kwin/-/commit/31c4b8ac555289309341b03bf813b4ac45d2e12d This later patch defines heapRect to reference thumb.windowHeap, but still runs it against "oldGlobalRect" and issue persists. It doesn't seem the coordinate space/objects used by Overview is accessible in the WindowHeapDelgate scope though? I wonder again if the fix may be better approached in the DropArea block of DesktopBar.qml: https://invent.kde.org/plasma/kwin/-/blob/master/src/plugins/overview/qml/DesktopBar.qml?ref_type=heads#L177
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/6833
Git commit 0e9f1e721c7b45b6b7d31a44df925483c1ec1155 by Marco Martin. Committed on 26/11/2024 at 10:50. Pushed by mart into branch 'master'. effects/overview: Animate if the thumbnail is dropped in an heap If the new position the thumbnail was dropped intersects the geometry of an heap in any way, then execute the animation, otherwise skip it (the case of drop on a desktop thumbnails in the overview) previous patch attempted that but with not completely correct logic M +2 -4 src/plugins/private/qml/WindowHeapDelegate.qml https://invent.kde.org/plasma/kwin/-/commit/0e9f1e721c7b45b6b7d31a44df925483c1ec1155
Sorry to report: https://invent.kde.org/plasma/kwin/-/commit/0e9f1e721c7b45b6b7d31a44df925483c1ec1155 fixes the Desktop Grid animations, but the Desktop Bar regresses back to BUG 495444 with the gliding windows on drop.
Git commit c402845961fa10185d7c28a49a9b72e7581258f8 by Marco Martin. Committed on 26/11/2024 at 13:03. Pushed by mart into branch 'Plasma/6.2'. effects/overview: Animate if the thumbnail is dropped in an heap If the new position the thumbnail was dropped intersects the geometry of an heap in any way, then execute the animation, otherwise skip it (the case of drop on a desktop thumbnails in the overview) previous patch attempted that but with not completely correct logic (cherry picked from commit 0e9f1e721c7b45b6b7d31a44df925483c1ec1155) 0e9f1e72 effects/overview: Animate if the thumbnail is dropped in an heap Co-authored-by: Marco Martin <notmart@gmail.com> M +2 -4 src/plugins/private/qml/WindowHeapDelegate.qml https://invent.kde.org/plasma/kwin/-/commit/c402845961fa10185d7c28a49a9b72e7581258f8
Seeing as https://invent.kde.org/plasma/kwin/-/commit/c402845961fa10185d7c28a49a9b72e7581258f8 for this ticket fixes the overall drop issue, but regresses back to BUG 495444, we can close this one and re-open the former.