fyne-io / systray

a cross platfrom Go library to place an icon and menu in the notification area
Apache License 2.0
230 stars 45 forks source link

systray error: unable to addOrUpdateMenuItem: Descripteur de menu non valide #78

Open henri9813 opened 4 months ago

henri9813 commented 4 months ago

Hello,

My app ( located here: https://github.com/henri9813/iPingTray ).

Cannot work on Windows,

here is my main.go file: https://github.com/henri9813/iPingTray/blob/main/main.go

Here is the issue on my side: https://github.com/henri9813/iPingTray/issues/2

Do you have an idea why it doesn't work ?

I try to run the app on a Windows 11.

Is it related to https://github.com/getlantern/systray/issues/184 ?

andydotxyz commented 4 months ago

Probably, the fork mostly just replaces the Linux code. You will need to have the systray initialised (i.e. by setting the icon or title) before you manipulate the menu items.

henri9813 commented 4 months ago

Setting Title is not enough on windows, you need to configure title and icon :)

Now, I have a working release of my project :) https://github.com/henri9813/iPingTray

andydotxyz commented 4 months ago

You should always set an Icon for setup - some platforms do not support the title display.