fyne-io / systray

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

Applications have same `Id` under Linux #50

Closed leukipp closed 1 year ago

leukipp commented 1 year ago

The status notifier plugin on Linux (XFCE) allows you to rearrange tray icons.

When running the example app, it looks like the Id property ("1") is used in this list: id-1

All fyne-io/systray applications use the same entry and therefore cannot be rearranged/hidden individually. This property is hardcoded here: https://github.com/fyne-io/systray/blob/b6a2d6ca2a7be3f45d6299fa7e02311667402595/systray_unix.go#L272

Changing the code section above to,

"Id": {
    Value:    t.title,
    ...
},

will use the application Title in the list: id-title

I'm not sure if this modification violates some specifications or if the property is related to the one used in: https://github.com/fyne-io/systray/blob/b6a2d6ca2a7be3f45d6299fa7e02311667402595/systray_unix.go#L178

If not, I would suggest this as a bug fix.

Jacalz commented 1 year ago

That does sound like a bug. Feel free to open a pull request. Contributions are always appreciated

leukipp commented 1 year ago

Any news if #51 can be merged?

Jacalz commented 1 year ago

Sorry. For the delay. We've been quite busy. I don't currently have any system tray set up for testing but I'll see that it get reviewed