https://bugs.kde.org/show_bug.cgi?id=527529

cwo <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |FIXED
      Latest Commit|https://invent.kde.org/plas |https://invent.kde.org/plas
                   |ma/plasma-desktop/-/commit/ |ma/plasma-desktop/-/commit/
                   |a4d7820fcb8fe28e326fe9fe281 |e65ad4464f51c3d1011356a4bfe
                   |60a74a0409396               |ae1b4e2b80dd4

--- Comment #11 from cwo <[email protected]> ---
Git commit e65ad4464f51c3d1011356a4bfeae1b4e2b80dd4 by Christoph Wolk.
Committed on 22/11/2026 at 10:18.
Pushed by cwo into branch 'Plasma/6.7'.

containments/desktop: handle drag image for very fast drags better

When something is selected, we pre-generate the drag image so that it's
ready if the user starts a drag. But this is asynchronous, and while
it's generally very fast, a determined with swift fingers can start the
drag before it's ready. There's two major ways that this can happen:

- The user has just moved one or more files, and tries to drag them
  again. In this case, they're still selected, the old dragImage is
  reused, but as they start from a different position now, the hotspot
  adjustment may put it ways away from the pointer.
- The user clicks and drags an icon that was not previously selected.
  In this case, there's no image at all, and the icon just vanishes
  while dragging.

Both are somewhat challenging to reproduce, but I've found the second
is easiest immediately after plasmashell start. But I've reproduced both
outside of that situation as well.

We do two things to fix this: for the first, we generate the dragImage
not just when the selection changes, but also when icons are moved -
this way it should be ready if the user starts dragging again. Second,
we track on the delegate whether the image is being generated, and skip
starting the drag if it's not. This is fast enough that it should be
ready once the next pixel is reached, so for the user there's no
perceptible difference - effectively just a marginally larger
startDragDistance, but it makes sure that when the drag starts, the icon
does not vanish.

M  +3    -0    containments/desktop/package/contents/ui/FolderItemDelegate.qml
M  +4    -0    containments/desktop/package/contents/ui/FolderView.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/e65ad4464f51c3d1011356a4bfeae1b4e2b80dd4

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to