From 5bd4bcf727b5c0479c06f854342604ece28c85c3 Mon Sep 17 00:00:00 2001 From: o9000 Date: Wed, 4 Feb 2015 23:15:57 +0000 Subject: [PATCH] Fix issue 343: Double system tray icons git-svn-id: http://tint2.googlecode.com/svn/trunk@685 121b4492-b84c-0410-8b4c-0d4edfb3f3cc --- src/systray/systraybar.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/systray/systraybar.c b/src/systray/systraybar.c index 4506292..f4637f2 100644 --- a/src/systray/systraybar.c +++ b/src/systray/systraybar.c @@ -359,6 +359,12 @@ gboolean add_icon(Window id) Panel *panel = systray.area.panel; int hide = 0; + GSList *l; + for (l = systray.list_icons; l; l = l->next) { + if (((TrayWindow*)l->data)->tray_id == id) + return FALSE; + } + error = FALSE; XWindowAttributes attr; if ( XGetWindowAttributes(server.dsp, id, &attr) == False ) return FALSE;