electron: The click event is ignored when using an app indicator tray icon
As documented in the Tray API docs, the click event is ignored for tray icons that have been created as an app indicator, i.e on Ubuntu Unity. This means “menu bar” style applications do not work on Ubuntu (see maxogden/menubar#1), making them not really cross-platform.
The reason there is no click event being exposed is that these kind of applications do not fit the “Ubuntu status menu design guidelines” and therefor libappindicator does not support it.
The proper solution would be to have Ubuntu alter there style guides and make the app indicator adhere the Status Notifier specification, or at least the Activate method. This has already been requested in Unity libappindicator bug 522152, which hasn’t received much attention since it’s creation in 2010, regardless of it’s high bug-heat score.
Tl;dr: I don’t think this will happen any time soon.
My plan is to work around the limitations set by libappindicator by listening directly to the signals sent by the Unity Panel service as described by @sjakthol. I already created a PoC.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 15
- Comments: 32 (15 by maintainers)
I can confirm that electron tray icons don’t appear to get click events on KWin/KDE. I really think this counts as a bug and not a enhancement request.
Slack is affected under KDE: left click doesn’t work, red notification freezes app.
Nobody has come up with a method to accomplish the goal. Care to comment again today? Or does the Linux developer simply abandon Electron if they want to make things work reliably? MacOS seems to be the only truly supported platform, Windows when possible and Linux is a happy coincidence at best.
Ooh I’ve been referenced. Yeah, I can confirm that my application doesn’t work on Ubuntu.