]> Dogcows Code - chaz/tint2/commitdiff
stop asynchronous tooltip when task removed/changed
authorThierry Lorthiois <lorthiois@bbsoft.fr>
Sat, 17 Oct 2009 10:47:15 +0000 (10:47 +0000)
committerThierry Lorthiois <lorthiois@bbsoft.fr>
Sat, 17 Oct 2009 10:47:15 +0000 (10:47 +0000)
src/taskbar/task.c

index 25c383ea1e372c129785a0f7f9b6a67a4c73d3ed..c8db413eaa9e95fc1cceb755e9377ccc0b73dce9 100644 (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);
This page took 0.025237 seconds and 4 git commands to generate.