GNOME: using AppIndicator in gnome shell causes bizzare warning
Issue generated from Tuleap's migration script. Originally submitted by: Stepan Salenikovich (ssalenik)
When using AppIndicator (instead of GtkStatusIcon API) in gnome shell, the following message is logged when the systray icon is initialized near the start of the program:
Gdk-CRITICAL \*\*: gdk\_window\_thaw\_toplevel\_updates: assertion 'window->update\_and\_descendants\_freeze\_count > 0' failed
Because this error is shown near the begging of the program, its often misleading. If gnome-ring crashes soon after launch, people often think this error might have something to do with it.
AppIndicator API is only needed for the systray icon to work correctly in Unity, so instead of using it if it is installed, we should only use it if we detect Unity as the desktop environment. This can be determined by checking the XDG\_CURRENT\_DESKTOP env var.