From f29db16481f7efc292e6e93c6f12ae524efa8a0a Mon Sep 17 00:00:00 2001 From: deepend Date: Sat, 5 Dec 2026 10:03:08 -0600 Subject: [PATCH] fix issue 332 --- src/fe-gtk/plugin-tray.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/fe-gtk/plugin-tray.c b/src/fe-gtk/plugin-tray.c index 04fe0f06..f18f3422 100644 --- a/src/fe-gtk/plugin-tray.c +++ b/src/fe-gtk/plugin-tray.c @@ -418,6 +418,17 @@ tray_app_indicator_cleanup (void) } } +static void +tray_app_indicator_activate_cb (AppIndicator *indicator, gint x, gint y, gpointer userdata) +{ + (void)indicator; + (void)x; + (void)y; + (void)userdata; + + tray_menu_restore_cb (NULL, NULL); +} + static gboolean tray_app_indicator_init (void) { @@ -430,6 +441,11 @@ tray_app_indicator_init (void) if (!tray_indicator) return FALSE; + /* Primary activation was added in Ayatana AppIndicator 0.6.0. */ + if (g_signal_lookup ("activate", G_OBJECT_TYPE (tray_indicator))) + g_signal_connect (G_OBJECT (tray_indicator), "activate", + G_CALLBACK (tray_app_indicator_activate_cb), NULL); + tray_menu = gtk_menu_new (); g_signal_connect (G_OBJECT (tray_menu), "show", G_CALLBACK (tray_menu_show_cb), NULL);