[Ok, thanks.
I'm using Ubuntu 24.04.4 LTS. I'm, using Cinnamon, because with Gnome i have meny problem.
Yes, gnome is not very friendly.
The problem is that when I click on the tray icon, whether I right-click or left-click, it always does the same thing, which is what it's supposed to do when I right-click.
I think, but will need to check, that 'some' desktops only allow one menu to be attached to the trayicon. You might be able detect the click but if you want it to popup a menu, it may not be where the user clicked. And users hate that.
Again, from memory, in my app, I associate the same menu with both left and right clicks. Thats to ensure the least surprises for end user. On KDE for example, Wayland with Qt5 and Qt6, the left click does not bring up the menu but the right click overload does. So, when user clicks left, I send a notification, "Please use right click". No sign of that problem using gtk3 (yippy!).
On some desktops, the desktop grabs a right click for its own use. So, the rule is, keep it simple, one menu is all you should hope for.
Also, my recent tests indicate that gtk3 on Gnome requires libayatana-appindicator3-1 and gnome-shell-extension-appindicator, pretty much the same as gtk2. You are fortunate in using Ubuntu, they add those to their base install of Gnome. If you will be distributing your app to other people, remember if they are using Debian Gnome or Fedora Gnome (for example) they must install those things. And log off and back in and enable the extension. Its a right royal pain.
Davo