mirror-kde-plasma-desktop/containments
Christoph Wolk ebfd56d594 containments/desktop: don't reset press position onModelReset
FolderView tracks the pointer position on press, and uses that
information on pointer move to start a drag or rubberband. However,
when something resets the model (such as when a lot of files are deleted
and each deletion resets the model), this information is reset. For the
most part, this means that you can't rubberband while the deletions
happen (you press, the press is reset, you move the mouse and nothing
happens) which isn't great but also not too bad. However, if you manage
to time it just right that the click and move happens fully within the
short period between resets, you'll start the rubberband, then the reset
changes the active rubberband to start at -1, -1 instead of the position
you actually clicked.

A somewhat easier to trigger condition is if some other process removes
or adds files to the desktop while the user is mid-rubberband, such as a
browser downloading things. In that case, the origin will also move from
the clicked position to the top left while the rubberband is active.

This is quite weird. So instead just update the rubberBand's origin if
the rubberband is not active yet. We keep resetting the press state
otherwise to keep the change as small as possible. This means that
starting a rubberband while a large number of files are quickly
added/removed one-by-one will continue to not work unless you get the
timing exactly right. But having to briefly wait while the system is
clearly doing something is less bad than suddenly changing the
rubberband region mid-operation, and changing this can wait for the
new desktop implementation (if feasible then).

BUG: 526073
FIXED-IN: 6.9.0
2026-10-29 17:50:38 +00:00
..
desktop containments/desktop: don't reset press position onModelReset 2026-10-29 17:50:38 +00:00
folder SVN_SILENT made messages (.desktop file) - always resolve ours 2026-10-05 01:51:33 +00:00
panel containments/panel: Use the panel length as the spacer size limit 2026-10-22 22:57:33 +02:00
CMakeLists.txt [containments/panel] Port to plasma_add_applet 2025-07-29 16:32:37 +02:00