Bug 442485

Summary: Delete key to move desktop file to trash does not work after restarting plasmashell, showing the desktop, and selecting a file
Product: [Plasma] plasmashell Reporter: Nate Graham <nate>
Component: FolderAssignee: Derek Christ <christ.derek>
Status: RESOLVED FIXED    
Severity: normal CC: plasma-bugs
Priority: VHI Keywords: regression
Version: git-master   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=438930
Latest Commit: Version Fixed In:

Description Nate Graham 2021-09-15 17:03:06 UTC
STEPS TO REPRODUCE
1. Restart plasmashell with `plasmashell --replace`
2. Invoke the show desktop effect
3. Select a file on the desktop (don't open, select) by dragging a box onto it or clicking the Plus button in its corner
4. Hit the Delete key


OBSERVED RESULT
Nothing happens


EXPECTED RESULT
The file should be moved to the trash


ADDITIONAL INFORMATION
It seems like something is not getting focus for handling key events properly; if I right-click on the file and then left-click to close the menu, the file remains selected the the Del key will move it to the trash. The file jist doesn't get focus

The issue only seems to affect the Delete key; other shortcuts are not affected
Comment 1 Nate Graham 2021-09-15 17:03:56 UTC
Git bisect say this regression was introduced with https://invent.kde.org/plasma/plasma-desktop/-/commit/f830ceeaf012a9f87b7c0b2b2bb9b095de107da4.

Derek, would you mind having a look? Thanks!
Comment 2 Bug Janitor Service 2021-09-15 17:58:18 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/562
Comment 3 Derek Christ 2021-09-15 18:00:38 UTC
Git commit 6414da73867a39f4ce5cfade20d01d918496f2d9 by Derek Christ.
Committed on 15/09/2021 at 17:55.
Pushed by ngraham into branch 'master'.

Fix a bug regarding the remove action in the folder plugin

Fix a bug that caused not being able to remove files from the desktop
using the delete key when no context menu was opened since the start
of the plasmashell.

M  +3    -0    containments/desktop/plugins/folder/foldermodel.cpp
M  +0    -2    containments/desktop/plugins/folder/removeaction.cpp

https://invent.kde.org/plasma/plasma-desktop/commit/6414da73867a39f4ce5cfade20d01d918496f2d9