No, the System Tray also needs to call its OnClick handler when left-clicked.
Ahh, finally I understand.
Looking at my table, there seems to be a number of combinations. Note that Mate gives you System Panel menu, some give us a popup menu with either left or right click, some pass back to a click handler. I guess thats the "complicated interface" that Shuttleworth and the Gnome developers complain about.
I always ensure both left or right click give me the popup menu because thats what I believe users expect. Maybe ....
Juha, my table says Cinnamon does work in both SystemTray mode and LibAppIndicator3 mode and yes, I see how its a touch more useful in SystemTray one. So, good idea for now. However, thats just the immediate problem. But from what I have read, the trend is going to be away from the SystemTray, did you read the XFCE blog for example ? And even libappindicator3 is just a transitional thing....
So, if programmers do write code that depends on being able to both trigger a Popup Menu and detect, separately, a left click, they will have a diminishing number of possible Linux OSs that will do so. And we'll have the situation where end users will upgrade their OS and find something no longer works. And more Distros might drop SystemTray without supporting the transitional LibAppIndicator3 (as RedHat and Suse have done).
I will keep testing and add a note on the wiki page that warns programmers about this situation. Trying to get a release of my app out right now too !
The real solution is, I am afraid, a new model for Linux depending on the AppNotifier instead. But the AppNotifier appears to be very poorly documented and, obviously there are not yet any Pascal bindings to it. It works through DBus but I cannot workout if we talk directly through dbus of if there is a common API closer to user spaces. Sigh ....
Thanks Juhu, sorry we are giving you a hard time !
Davo
EDIT: OK, I really understand now. If you don't assign a popup menu, then there are cases where 61820 does not show its icon ! And they can join the other cases where that icon is not visible. Sigh, what a mess. Juha's method of filtering out on a desktop by desktop basis seems an even better one now.
Sorry, I never thought to test when there is no popup menu assigned.
If it was not just a temporary fix, I'd suggest it needs to be made some sort of compile time option because we need different rules for applications that will assign a menu compared to ones that want to deal with the click in their own code. I have altered my table to and will start mapping that extra behaviour. Sigh.