From 2b97238a1da86d4b6b1ce8240382fd83ee7e1d64 Mon Sep 17 00:00:00 2001 From: Ruben Pollan Date: Wed, 14 Mar 2018 17:28:21 +0100 Subject: [PATCH] Fixed hide show in linux Closes #37 --- systray_linux.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/systray_linux.c b/systray_linux.c index 69b90be2..ccaac2ac 100644 --- a/systray_linux.c +++ b/systray_linux.c @@ -101,7 +101,7 @@ gboolean do_add_or_update_menu_item(gpointer data) { } GtkWidget * menu_item = GTK_WIDGET(((MenuItemNode*)(it->data))->menu_item); gtk_widget_set_sensitive(menu_item, mii->disabled == 1 ? FALSE : TRUE); - gtk_widget_show_all(global_tray_menu); + gtk_widget_show(menu_item); free(mii->title); free(mii->tooltip); @@ -112,6 +112,8 @@ gboolean do_add_or_update_menu_item(gpointer data) { gboolean do_add_separator(gpointer data) { GtkWidget *separator = gtk_separator_menu_item_new(); gtk_menu_shell_append(GTK_MENU_SHELL(global_tray_menu), separator); + gtk_widget_show(separator); + return FALSE; } // runs in main thread, should always return FALSE to prevent gtk to execute it again