Bug 456994 - Press and hold to enter edit mode is inconsistent across desktop area
Summary: Press and hold to enter edit mode is inconsistent across desktop area
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Desktop icons & Folder View widget (show other bugs)
Version: master
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2022-07-21 19:45 UTC by ratijas
Modified: 2022-08-09 22:19 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.24.7
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ratijas 2022-07-21 19:45:38 UTC
SUMMARY

Pressing and holding on a seemingly empty space of a desktop may or may not trigger Edit Mode depending on a quite unrelated factor.

Folder applet arranges icons in a grid, left to right and top-to-bottom. There seem to be an event filter at each grid cell regardless whether an icon is present there or not. It also seem to only create as much cells (including filters) as needed to represent all existing icons, same left-to-right top-to-bottom.

Imagine this being the layout of your desktop, where "O" are icons and numbers are positions where you press with a cursor.

    +---------------+
    | O 1  o    O   |
    |         2     |
    | 3 o   4       |
    |               |
    |    5          |
    +---------------+

At locations number 1, 2 and 3 pressing and holding won't trigger the Edit Mode, because the grid still contains more items to layout. At 4 and 5, however, Edit Mode will be triggered.

STEPS TO REPRODUCE
1. Ensure there is only a single on a desktop.
2. Press and hold either anywhere on top of it, or on the same row strictly on the left of it.
3. Press and hold anywhere below it, or on the same row strictly on the right of it.

OBSERVED RESULT
In step 2 Plasma will NOT enter Edit Mode.
In step 3 Plasma will enter Edit Mode.

EXPECTED RESULT
I don't feel like pressing and holding on a free desktop space to enter Edit Mode should be a thing at all. But since it exists anyway, at least it shouldn't be inconsistent and random like this.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE: git master
Qt Version: 5.15.5
Kernel Version: 5.18.12-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-6700HQ CPU @ 2.60GHz
Memory: 15.6 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 970M/PCIe/SSE2
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: G752VT
System Version: 1.0
Comment 1 Nate Graham 2022-07-22 18:25:52 UTC
Can reproduce.
Comment 2 ratijas 2022-08-09 20:05:52 UTC
plasma-desktop/containments/desktop/package/contents/ui/FolderItemDelegate.qml:
>    MouseArea { anchors.fill: parent } // This MouseArea exists to intercept press and hold;
>                                       // preventing edit mode from being triggered
>                                       // when pressing and holding on an icon

So… uhh… it's kind of intentional?
Comment 3 Bug Janitor Service 2022-08-09 20:13:59 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1081
Comment 4 ratijas 2022-08-09 22:16:36 UTC
Git commit c840409ff2983573ae13f303e3534bbeda263bf9 by ivan tkachenko.
Committed on 09/08/2022 at 21:07.
Pushed by ratijas into branch 'master'.

[desktop/package] Fix inconsistent press-to-enter-edit-mode behavior

Just don't intercept mouse events when there is no icon in a folder view
delegate.
FIXED-IN: 5.24.7, 5.25.5, 5.26

M  +6    -3    containments/desktop/package/contents/ui/FolderItemDelegate.qml

https://invent.kde.org/plasma/plasma-desktop/commit/c840409ff2983573ae13f303e3534bbeda263bf9
Comment 5 ratijas 2022-08-09 22:19:16 UTC
Git commit 3e5d3679b809f81952d85fe822a354358fae7164 by ivan tkachenko.
Committed on 09/08/2022 at 22:19.
Pushed by ratijas into branch 'Plasma/5.25'.

[desktop/package] Fix inconsistent press-to-enter-edit-mode behavior

Just don't intercept mouse events when there is no icon in a folder view
delegate.
FIXED-IN: 5.24.7, 5.25.5, 5.26
(cherry picked from commit c840409ff2983573ae13f303e3534bbeda263bf9)

M  +6    -3    containments/desktop/package/contents/ui/FolderItemDelegate.qml

https://invent.kde.org/plasma/plasma-desktop/commit/3e5d3679b809f81952d85fe822a354358fae7164
Comment 6 ratijas 2022-08-09 22:19:45 UTC
Git commit 52151c72e25bba286f860e2eb483a8c642bd9a14 by ivan tkachenko.
Committed on 09/08/2022 at 22:19.
Pushed by ratijas into branch 'Plasma/5.24'.

[desktop/package] Fix inconsistent press-to-enter-edit-mode behavior

Just don't intercept mouse events when there is no icon in a folder view
delegate.
FIXED-IN: 5.24.7, 5.25.5, 5.26
(cherry picked from commit c840409ff2983573ae13f303e3534bbeda263bf9)

M  +6    -3    containments/desktop/package/contents/ui/FolderItemDelegate.qml

https://invent.kde.org/plasma/plasma-desktop/commit/52151c72e25bba286f860e2eb483a8c642bd9a14