I experimented with implementing the Activate method, it gets called when left-clicking the status icon. But there is nothing to activate when Activate is called.
AppIndicator has a "menu" reference, but "menu" can not be activated, only MenuItem.
AppIndicator itself can not be activated as well.
(Or nobody listens for that signals)
The half-assed workaround Electron is doing is to create a dummy MenuItem, with label set the same as the status icon tooltip and add a "click-action-item" flag.
Note: "SecondaryActivate" is only called on middle-button click. On right click, the menu is open directly, without any method called on the AppIndicator DBus. On left click, the "Activate" method is called if it exists. (at least in KDE Plasma 5.24.6)
I experimented with implementing the Activate method, it gets called when left-clicking the status icon. But there is nothing to activate when Activate is called.
AppIndicator has a "menu" reference, but "menu" can not be activated, only MenuItem.
AppIndicator itself can not be activated as well.
(Or nobody listens for that signals)
The half-assed workaround Electron is doing is to create a dummy MenuItem, with label set the same as the status icon tooltip and add a "click-action-item" flag.
https:/ /github. com/electron/ electron/ blob/8532e1239e c929e31b764ffcd 314c8db3e09a19f /shell/ browser/ ui/gtk/ app_indicator_ icon_menu. cc#L65
But this item never gets actually added to the Menu, as HasClickAction always returns false. /github. com/electron/ electron/ blob/8532e1239e c929e31b764ffcd 314c8db3e09a19f /shell/ browser/ ui/tray_ icon_gtk. cc#L64
https:/
Note: "SecondaryActivate" is only called on middle-button click. On right click, the menu is open directly, without any method called on the AppIndicator DBus. On left click, the "Activate" method is called if it exists. (at least in KDE Plasma 5.24.6)