Bug 442758 - Some apps' tray icons don't have context menu anymore
Summary: Some apps' tray icons don't have context menu anymore
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: System Tray (show other bugs)
Version: 5.22.90
Platform: Debian unstable Linux
: VHI normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2021-09-21 03:26 UTC by Norbert Preining
Modified: 2021-10-17 23:23 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.23


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Norbert Preining 2021-09-21 03:26:59 UTC
SUMMARY

Some applications, e.g., virt-manager, don't have right-click context menus anymore since upgrade from 5.22.5 to 5.22.90

STEPS TO REPRODUCE
1. start virt-manager
2. right click on the virt-manager icon

OBSERVED RESULT

no context menu is shown

EXPECTED RESULT

context menu with defined and running machines etc


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
Operating System: Debian GNU/Linux
KDE Plasma Version: 5.22.90
KDE Frameworks Version: 5.86.0
Qt Version: 5.15.2


ADDITIONAL INFORMATION
Comment 1 Christian Göttsche 2021-09-21 12:24:12 UTC
Also some applications, like quasselclient and nextcloud-desktop, don't have any system tray icon anymore.
Comment 2 Rik Mills 2021-09-21 12:50:34 UTC
Confirmed with virt-manager. Context menu of Hexchat and Deluge also do not show.
Comment 3 Fabian Vogt 2021-09-21 13:30:44 UTC
dbus-monitor shows:

error time=1632171755.612986 sender=:1.194 -> destination=:1.173 error_name=org.freedesktop.DBus.Error.UnknownInterface reply_serial=458
   string "No such interface 'com.canonical.dbusmenu' at object path '/'"
error time=1632171755.613017 sender=:1.194 -> destination=:1.173 error_name=org.freedesktop.DBus.Error.UnknownMethod reply_serial=456
   string "No such method 'ProvideXdgActivationToken' in interface 'org.kde.StatusNotifierItem' at object path '/StatusNotifierItem' (signature 's')

Probably two bugs here: xembedsniproxy doesn't export that method (e782a1248d08adbaa9e3b4ef490c24765c6519c4 in p-w) and the applet breaks if the previously not existing method does not exist.
Comment 4 David Edmundson 2021-09-21 22:59:05 UTC
I don't think those are the reason. ProvideXdgActivationToken failing is harmless and expected.

What's problematic is that we're trying to use the DBusMenu iface, this doesn't make sense for xembedsniproxy. I suspect it's because of this harmless looking line when someone updated the iface to be in sync:

+    <property name="Menu" type="o" access="read"/>
Comment 5 David Edmundson 2021-09-21 23:03:15 UTC
Confirmed, default constructor for QDBusObjectPath is "/" hence this appears as a valid path despite having no implementation.

Should be an easy fix.
Comment 6 Bug Janitor Service 2021-09-21 23:10:33 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1076
Comment 7 Norbert Preining 2021-09-22 00:07:41 UTC
@David I can confirm that the proposed merge request fixes the issue, thanks a lot!
Comment 8 David Edmundson 2021-10-07 09:23:02 UTC
Git commit 448955e031e8ce86ab16f84899f91f0083cc7fa7 by David Edmundson.
Committed on 07/10/2021 at 09:22.
Pushed by davidedmundson into branch 'master'.

Revert "xembed: adapt to changes in KNotifications"

The file org.kde.StatusNotifierItem was syncronised with up-to-date
master, despite being previous edited to be only supported actions.

Whilst it seems harmless the line:
+    <property name="Menu" type="o" access="read"/>
means we now advertise this property.

Marshalling an empty path gives a warning.

Plasma-workspace "correctly" thinks we have a supported DBus menu and
therefore don't want to receive context menu events.

This reverts commit e782a1248d08adbaa9e3b4ef490c24765c6519c4.
This reverts commit b9de2c8546874efcc993913bd55d0ef252b866a8.

The XML file gains a comment at the top so this doesn't happen again.

M  +3    -39   xembed-sni-proxy/org.kde.StatusNotifierItem.xml
M  +0    -6    xembed-sni-proxy/sniproxy.cpp
M  +1    -7    xembed-sni-proxy/sniproxy.h

https://invent.kde.org/plasma/plasma-workspace/commit/448955e031e8ce86ab16f84899f91f0083cc7fa7
Comment 9 David Edmundson 2021-10-07 09:23:32 UTC
Git commit f6fda052363fa2a4ca8d3dbddbb4d6b22ea4587c by David Edmundson.
Committed on 07/10/2021 at 09:23.
Pushed by davidedmundson into branch 'Plasma/5.23'.

Revert "xembed: adapt to changes in KNotifications"

The file org.kde.StatusNotifierItem was syncronised with up-to-date
master, despite being previous edited to be only supported actions.

Whilst it seems harmless the line:
+    <property name="Menu" type="o" access="read"/>
means we now advertise this property.

Marshalling an empty path gives a warning.

Plasma-workspace "correctly" thinks we have a supported DBus menu and
therefore don't want to receive context menu events.

This reverts commit e782a1248d08adbaa9e3b4ef490c24765c6519c4.
This reverts commit b9de2c8546874efcc993913bd55d0ef252b866a8.

The XML file gains a comment at the top so this doesn't happen again.


(cherry picked from commit 448955e031e8ce86ab16f84899f91f0083cc7fa7)

M  +3    -39   xembed-sni-proxy/org.kde.StatusNotifierItem.xml
M  +0    -6    xembed-sni-proxy/sniproxy.cpp
M  +1    -7    xembed-sni-proxy/sniproxy.h

https://invent.kde.org/plasma/plasma-workspace/commit/f6fda052363fa2a4ca8d3dbddbb4d6b22ea4587c