From e58d128c73701603a6bb16a96509093c88710cd5 Mon Sep 17 00:00:00 2001 From: deepend-tildeclub <58404188+deepend-tildeclub@users.noreply.github.com> Date: Sun, 22 Feb 2026 14:54:18 +0000 Subject: [PATCH] Implement fallback for tray icon resolution Add fallback for tray icon if desktop-id fails to resolve. --- src/fe-gtk/plugin-tray.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/fe-gtk/plugin-tray.c b/src/fe-gtk/plugin-tray.c index ff83f0e0..84bd3cec 100644 --- a/src/fe-gtk/plugin-tray.c +++ b/src/fe-gtk/plugin-tray.c @@ -311,6 +311,19 @@ tray_gtk3_icon_to_name (TrayIcon icon, char **allocated) names = g_themed_icon_get_names (G_THEMED_ICON (icon)); if (names && names[0]) { + /* + * Some StatusNotifier hosts (e.g. XFCE plugin combinations) can fail to + * resolve our desktop-id icon name even when GTK's icon theme lookup says + * it exists. Prefer an absolute PNG fallback for the app's normal icon so + * the tray item never renders as a blank placeholder. + */ + if (g_strcmp0 (names[0], ICON_NORMAL_NAME) == 0) + { + *allocated = tray_gtk3_fallback_icon_path_for_name (names[0]); + if (*allocated) + return *allocated; + } + theme = gtk_icon_theme_get_default (); if (theme && gtk_icon_theme_has_icon (theme, names[0])) return names[0];