Bug 504569

Summary: Touch drag selection of multiple desktop icons fails when releasing over icon
Product: [Plasma] plasmashell Reporter: Oliver Beard <olib141>
Component: Desktop icons & Folder View widgetAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: minor CC: hein, nate
Priority: NOR    
Version First Reported In: 6.2.5   
Target Milestone: 1.0   
Platform: SteamOS   
OS: Linux   
Latest Commit: Version Fixed In: 6.4.1
Sentry Crash Report:
Attachments: Video demonstration of bug as described (release over empty space, release over icon)

Description Oliver Beard 2025-05-20 14:30:35 UTC
SUMMARY
When touch dragging to select multiple desktop icons, if you release touch over an icon, only that icon is selected. If you release touch over empty space (where no icon's bounding box is) then all icons bounded by the drag are selected.

STEPS TO REPRODUCE
1. With touch input, drag to select multiple desktop icons
2. Release touch input whilst over a desktop icon

OBSERVED RESULT
Only the desktop icon touch input is released over is selected.

EXPECTED RESULT
All icons bounded by the selection rectangle are selected.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: SteamOS 3.8 Build: 20250516.1000
KDE Plasma Version: 6.2.5
KDE Frameworks Version: 6.9.0
Qt Version: 6.8.1
Comment 1 Oliver Beard 2025-05-20 14:32:43 UTC
Created attachment 181573 [details]
Video demonstration of bug as described (release over empty space, release over icon)
Comment 2 Nate Graham 2025-05-20 16:41:15 UTC Comment hidden (spam)
Comment 3 Nate Graham 2025-05-20 16:41:26 UTC Comment hidden (spam)
Comment 4 cwo 2025-06-20 16:25:28 UTC
Git commit dbd2551e3097433b838facf4045c67427069a581 by Christoph Wolk.
Committed on 20/06/2025 at 16:25.
Pushed by cwo into branch 'master'.

containments/desktop: fix folder view clicking

53d67b9a0b82fff40b2057f1ceb74b529b943df5 made clicking use the same
logic to determine the selected item for mouse and touch, rather than
relying on hover events. It seems the logic for touch was broken in some
cirumstances, namely scrolled views and certain alignments, where the
coordinate systems do not align.

A similar issue was already fixed elsewhere in folder view with
509b655ef2edef04a13d9afaab6349911beaaeb1, so we reuse the approach here.
Related: bug 497498, bug 505718
FIXED-IN: 6.4.1

----

Would be good if someone could test if this works with touch, as I don't have a functional touch device handy. Might be that this was also broken there (couldn't find a bug report there though) or doesn't apply.

M  +2    -1    containments/desktop/package/contents/ui/FolderView.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/dbd2551e3097433b838facf4045c67427069a581
Comment 5 cwo 2025-06-20 17:58:59 UTC
Git commit f6c6e03a5fed3435ea47605e232af57140625440 by Christoph Wolk.
Committed on 20/06/2025 at 16:25.
Pushed by cwo into branch 'Plasma/6.4'.

containments/desktop: fix folder view clicking

53d67b9a0b82fff40b2057f1ceb74b529b943df5 made clicking use the same
logic to determine the selected item for mouse and touch, rather than
relying on hover events. It seems the logic for touch was broken in some
cirumstances, namely scrolled views and certain alignments, where the
coordinate systems do not align.

A similar issue was already fixed elsewhere in folder view with
509b655ef2edef04a13d9afaab6349911beaaeb1, so we reuse the approach here.
Related: bug 497498, bug 505718
FIXED-IN: 6.4.1

----

Would be good if someone could test if this works with touch, as I don't have a functional touch device handy. Might be that this was also broken there (couldn't find a bug report there though) or doesn't apply.


(cherry picked from commit dbd2551e3097433b838facf4045c67427069a581)

4445acf7 containments/desktop: fix folder view clicking

Co-authored-by: Christoph Wolk <cwo.kde@posteo.net>

M  +2    -1    containments/desktop/package/contents/ui/FolderView.qml

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