taffybar / gtk-sni-tray

A StatusNotifierHost widget written using the gtk+3 bindings for haskell provided by gi-gtk.
BSD 3-Clause "New" or "Revised" License
35 stars 2 forks source link

Some dynamic icons unchanging #13

Closed ARR8 closed 6 years ago

ARR8 commented 6 years ago

When launched, a program will add an icon to the tray. However, the icon is not updated, even as it would be in other tray programs. Restarting the program updates the icon correctly, but it does not update while the program is running. Example: lxqt-powermanagement

colonelpanic8 commented 6 years ago

This is certainly not true of all programs, try nm-applet, for example.

It could be that lxqt-powermanagement is not emitting a property changed event. The solution here maybe be to institute a polling refresh management system.

ARR8 commented 6 years ago

I've just installed nm-applet and it does not appear in the tray for me. This may be because I do not use network manager, but it launches without error.

colonelpanic8 commented 6 years ago

@ARR8 you need to make sure it is compiled with appindicator. Not sure what distro you are on, but you can compile from source pretty easily.

colonelpanic8 commented 6 years ago

pasystray is another icon for which updating works

ARR8 commented 6 years ago

Ha, I also don't use pulseaudio. I'll look into compiling that program. The arch settings for it use the default flags.

ARR8 commented 6 years ago

I've found a build script for nm-applet with appindicator. I've compiled it and it still does not appear in the tray. This is with status-notifier-watcher running separately.

colonelpanic8 commented 6 years ago

@ARR8 Yeah my recollection is that for whatever reason, that package did not work for me either.

The version that nix builds does work FWIW.

I'm very sure that icon updating does work, provided that the applications actual send the proper signals.

I'll look at some of the examples you've given and see if I can figure out why they aren't updating.

colonelpanic8 commented 6 years ago

@ARR8 Do you have any other examples of this other than

lxqt-powermanagement.

I cant seem to get it to work on my machine for whatever reason.

colonelpanic8 commented 6 years ago

Could this have been related to #10?

10 was creating extra icons that weren't properly managed, and so the icons would not get updated.

ARR8 commented 6 years ago

No, most of my other icons are (apparently) xembed, including all the other dynamic ones.

I still have this issue.

colonelpanic8 commented 6 years ago

@ARR8 So just to be clear you ahve this issue with lxqt-powermanagement, but no other icons, correct?

ARR8 commented 6 years ago

Yes, I should specify. The xembed icons, once I figured out how to get them to appear (#11), worked fine. For example, the Syncthing-GTK icon rotates when syncing. As far as I can tell, this issue is only for SNI, or maybe even just this one program.

colonelpanic8 commented 6 years ago

@ARR8 Was able to get lxqt-powermanagement working. Seems like you need to actually have a battery in order for it to show the icon.

It seems that the QT SNI implementation sends out the IconNameUpdated signal EVEN when what they actually want you to update is the IconPixbufs (not the icon name).

This is again, OUT OF SPEC, and kind of frustrating, but I'm working on a fix right now.

colonelpanic8 commented 6 years ago

@ARR8 This is fixed in https://github.com/IvanMalison/status-notifier-item/commit/ee552f700a53167822d3eddfebc42a7b678feb98

You can use the SNIQTFixes branch or install from status-notifier-item master.

Can you verify that the issue is fixed?

ARR8 commented 6 years ago

Yep, fixed, thanks.

I'm a little surprised that Qt programs don't follow spec here, especially since it seems like they're the only ones which default to SNI on my system. Maybe this is worth filing an issue against for the lxqt team?