From: Thierry Lorthiois Date: Sat, 17 Oct 2009 10:47:15 +0000 (+0000) Subject: stop asynchronous tooltip when task removed/changed X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=998d6dfc71c51623d5304e85d182bac5158e9b56;p=chaz%2Ftint2 stop asynchronous tooltip when task removed/changed --- diff --git a/src/taskbar/task.c b/src/taskbar/task.c index 25c383e..c8db413 100644 --- a/src/taskbar/task.c +++ b/src/taskbar/task.c @@ -100,6 +100,12 @@ void remove_task (Task *tsk) Window win = tsk->win; int desktop = tsk->desktop; + if (g_tooltip.task == tsk) { + tooltip_hide(); + alarm(0); + g_tooltip.task = 0; + } + // free title and icon just for the first task // even with task_on_all_desktop and with task_on_all_panel //printf("remove_task %s %d\n", tsk->title, tsk->desktop); @@ -151,6 +157,12 @@ void get_title(Task *tsk) if (!panel->g_task.text && !g_tooltip.enabled) return; + if (g_tooltip.task == tsk) { + tooltip_hide(); + alarm(0); + g_tooltip.task = 0; + } + name = server_get_property (tsk->win, server.atom._NET_WM_VISIBLE_NAME, server.atom.UTF8_STRING, 0); if (!name || !strlen(name)) { name = server_get_property (tsk->win, server.atom._NET_WM_NAME, server.atom.UTF8_STRING, 0);