Bug 501856 - Left-click then right-click on desktop in quick succession results in different context menu
Summary: Left-click then right-click on desktop in quick succession results in differe...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (other bugs)
Version First Reported In: master
Platform: Neon Linux
: NOR minor
Target Milestone: 1.0
Assignee: Nate Graham
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-22 12:44 UTC by Tamás Králl
Modified: 2025-04-14 15:21 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.4.0
Sentry Crash Report:


Attachments
A context menu that's more compact than the default context menu (28.52 KB, image/png)
2025-03-22 12:44 UTC, Tamás Králl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tamás Králl 2025-03-22 12:44:11 UTC
Created attachment 179644 [details]
A context menu that's more compact than the default context menu

SUMMARY
Left-clicking and then quickly right-clicking on the desktop results in a different context menu than what is provided on a single right-click. This behavior is similar to the chord keyboard shortcuts that were all removed about a month ago.

I've attached a picture showing the unusual context menu.
Comment 1 Nate Graham 2025-03-25 22:51:08 UTC
Can reproduce.
Comment 2 cwo 2025-04-03 13:48:30 UTC
Same happens here when pressing left and right buttons at the same time (with middle click emulation turned off).
Comment 3 Nate Graham 2025-04-11 23:07:33 UTC
It's effortless to reproduce with a real mouse. Left click and hold, and with the left button held down, right-click.
Comment 4 Nate Graham 2025-04-13 17:16:13 UTC
When triggering this bug, the menu that you see comes from here: https://invent.kde.org/plasma/plasma-desktop/-/blob/master/containments/desktop/plugins/folder/foldermodel.cpp?ref_type=heads#L1905

When you right-click on an item, the menu that you see comes from here: https://invent.kde.org/plasma/plasma-desktop/-/blob/master/containments/desktop/plugins/folder/foldermodel.cpp?ref_type=heads#L1917

When you right-click on en empty area of the desktop *without* triggering this bug, the menu that you see comes from the desktop context menu plugin: https://invent.kde.org/plasma/plasma-workspace/-/blob/master/containmentactions/contextmenu/menu.cpp

So basically, the issue here is that the first menu should not exist; instead it should fall back to displaying the menu from the desktop context menu plugin.
Comment 5 Bug Janitor Service 2025-04-13 20:40:44 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2944
Comment 6 Nate Graham 2025-04-14 15:21:25 UTC
Git commit 635ea80c8f1da2d6e16dda469edde63b2c0ff1b8 by Nate Graham.
Committed on 14/04/2025 at 14:47.
Pushed by ngraham into branch 'master'.

Folder View: Don't show wrong context menu when left-and-right-clicking

On devices with physical left and right buttons, it's possible to
right-click while holding down the left button. When doing this on the
desktop, you get the wrong context menu, because Folder View code was
inappropriately handling the event rather than falling back to the
desktop context menu plugin.

To fix this, explicitly handle that case and don't accept the event,
allowing it to fall back properly.
FIXED-IN: 6.4.0

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

https://invent.kde.org/plasma/plasma-desktop/-/commit/635ea80c8f1da2d6e16dda469edde63b2c0ff1b8