summary refs log tree commit diff stats
path: root/src/fe-gtk/plugin-tray.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fe-gtk/plugin-tray.c')
-rw-r--r--src/fe-gtk/plugin-tray.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/fe-gtk/plugin-tray.c b/src/fe-gtk/plugin-tray.c
index 48defb1f..b5f1624a 100644
--- a/src/fe-gtk/plugin-tray.c
+++ b/src/fe-gtk/plugin-tray.c
@@ -29,6 +29,7 @@
 #include "pixmaps.h"
 #include "maingui.h"
 #include "menu.h"
+#include "gtkutil.h"
 
 #ifndef WIN32
 #include <unistd.h>
@@ -759,7 +760,8 @@ tray_apply_setup (void)
 	}
 	else
 	{
-		if (prefs.hex_gui_tray && !unity_mode ())
+		GtkWindow *window = GTK_WINDOW(hexchat_get_info (ph, "gtkwin_ptr"));
+		if (prefs.hex_gui_tray && gtkutil_tray_icon_supported (window))
 			tray_init ();
 	}
 }
@@ -793,7 +795,8 @@ tray_plugin_init (hexchat_plugin *plugin_handle, char **plugin_name,
 
 	hexchat_hook_print (ph, "Focus Window", -1, tray_focus_cb, NULL);
 
-	if (prefs.hex_gui_tray && !unity_mode ())
+	GtkWindow *window = GTK_WINDOW(hexchat_get_info (ph, "gtkwin_ptr"));
+	if (prefs.hex_gui_tray && gtkutil_tray_icon_supported (window))
 		tray_init ();
 
 	return 1;       /* return 1 for success */