Bug 450429 - Context menu of tray icon opens twice when activated by right-clicking
Summary: Context menu of tray icon opens twice when activated by right-clicking
Status: RESOLVED DUPLICATE of bug 409768
Alias: None
Product: plasmashell
Classification: Plasma
Component: System Tray (show other bugs)
Version: 5.24.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2022-02-17 08:03 UTC by sunnerlp+kde
Modified: 2022-02-22 21:17 UTC (History)
5 users (show)

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


Attachments
Video of the bug in action (1.58 MB, video/mp4)
2022-02-17 08:03 UTC, sunnerlp+kde
Details
Another vedio of the bug action (3.74 MB, video/mp4)
2022-02-18 03:28 UTC, Sigmund
Details
Script to list SNI services (739 bytes, application/x-shellscript)
2022-02-18 17:52 UTC, Konrad Materka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sunnerlp+kde 2022-02-17 08:03:45 UTC
Created attachment 146850 [details]
Video of the bug in action

SUMMARY
When opening the context menu of a tray icon by right-clicking and then afterwards clicking on an item in the task list, instead of opening the window of the selected task, the context menu opens up again. Doing the same thing by left-clicking works correctly. This started happening after updating to 5.24.0

STEPS TO REPRODUCE
1. Open the context menu of a tray icon (e.g. Steam, Remmina) by clicking on it with the right mouse button
2. Close the context menu again by clicking somewhere else on the screen
3. Select an application in the task list

OBSERVED RESULT
Instead of opening/switching to the selected application, the context menu of the previously selected tray icon opens up again.

EXPECTED RESULT
The selected application is shown and the context menu doesn't open

SOFTWARE/OS VERSIONS
Windows: -
macOS: -
Linux/KDE Plasma: Arch Linux
(available in About System)
KDE Plasma Version: 5.24.1
KDE Frameworks Version: 5.91.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
For a video of the bug in action, see the attached video. The first time the Steam icon is clicked with the right mouse button, the second time with the left mouse button.
Comment 1 Noah Davis 2022-02-17 12:37:28 UTC
I can't reproduce this on git master
Comment 2 Sigmund 2022-02-18 03:28:14 UTC
Created attachment 146899 [details]
Another vedio of the bug action

I have the same bug.

STEPS TO REPRODUCE
1. Open the context menu of a tray icon by clicking on it with the right mouse button, and then choose one of them.
2. Then right-clicking anywhere of the task manager(bar).
3. Besides right-clicking, if you click the left mouse on the task manager(bar) after right-clicking the tray icon, the application GUI will be closed.
Comment 3 Fushan Wen 2022-02-18 04:50:43 UTC
It can be appletAt() returns the old applet in `src/scriptengines/qml/plasmoid/containmentinterface.cpp`. Perhaps the added MouseArea caused the regression.
Comment 4 Konrad Materka 2022-02-18 16:54:33 UTC
Duplicate of Bug 449877?
Comment 5 Nate Graham 2022-02-18 16:59:13 UTC
I can't reproduce this on Wayland with the tray icons for Discord or Remmina. I don't have libappindicator installed.
Comment 6 Konrad Materka 2022-02-18 17:51:15 UTC
(In reply to Nate Graham from comment #5)
> I can't reproduce this on Wayland with the tray icons for Discord or
> Remmina. I don't have libappindicator installed.

I can on X11, with libappindicator. It is caused by https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1402, context menu with SNI has use clicked event, not pressed. I don't know why...

Without libappindicator it will most probably use XEmbed, which should not work on Wayland :) Or is it using SNI?
Comment 7 Konrad Materka 2022-02-18 17:52:21 UTC
Created attachment 146922 [details]
Script to list SNI services

Nate, you can use attached script to list SNI icons
Comment 8 Nate Graham 2022-02-21 21:38:03 UTC
According to that script, NeoChat has an SNI, but on Wayland, I only get one context menu when I right-click on it, whether or not I have libappindicator installed.
Comment 9 Konrad Materka 2022-02-22 18:37:41 UTC
When
Comment 10 Konrad Materka 2022-02-22 21:17:44 UTC

*** This bug has been marked as a duplicate of bug 409768 ***