stop asynchronous tooltip when task removed/changed

git-svn-id: http://tint2.googlecode.com/svn/trunk@217 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
This commit is contained in:
lorthiois@bbsoft.fr 2009-10-17 10:47:15 +00:00
parent 1d9990b400
commit 7ab7dd2393

View file

@ -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);