GNOME Bugzilla – Bug 731857
Tray Icon does not shows in gnome-shell
Last modified: 2015-01-24 00:39:41 UTC
Created attachment 278686 [details] Screenshots If between gtk_status_icon_set_from_file() and gtk_main() was too much time. Tray icon appears with no image. Steps to reproduce: 1) Use this code #include <gtk/gtk.h> #include <unistd.h> #define SLEEP_TIME 1 int main(int argc, char **argv) { gtk_init(&argc, &argv); GtkStatusIcon *tray_icon; tray_icon = gtk_status_icon_new(); gtk_status_icon_set_from_file(tray_icon, argv[1]); gtk_status_icon_set_visible(tray_icon, TRUE); printf("Wait\n"); sleep(SLEEP_TIME); printf("Do!\n"); gtk_main(); return 0; } 2) Compile with $ g++ ./main.cpp `pkg-config --cflags --libs gtk+-2.0` -o gtk2_sleep1 3) run: $ ./gtk2_sleep1 <PATH_TO_ICON>; Expected result: icon shows in tray with image . Actual result: Icon shoes in tray with no image. (see gtk2_sleep1.png in attachments) If setup SLEEP_TIME to 0, icon shows successfully. (see gtk2_sleep0.png in attachments) If compile with: g++ ./main.cpp `pkg-config --cflags --libs gtk+-3.0` -o gtk3_sleep1 Icon shows with small image. (see gtk3_sleep1.png and gtk3_sleep0.png in attachments)
I have this issue too. my software versions: OS: Arch Linux gnome-shell version 3.12.2-1 gtk2 version 2.24.23-1 gtk3 version 3.12.2-1
have the ability to change ticket's "Product:gtkmm" to "Product:gnome-shell"?
Marking as duplicate of bug 721596 to have discussion about this problem in one place. *** This bug has been marked as a duplicate of bug 721596 ***