X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2Ftaskbar%2Ftaskbar.c;h=10e0d13b0d292f338ecae947e70de1564a75ed12;hb=e050df33d29de6f7890b7111f6ea871aa5247743;hp=feeb18c67d34d98a09c693096acd6ddb1eb122ed;hpb=b85e7f020866c27d0f53f3d0d02b9ba43be52e56;p=chaz%2Ftint2 diff --git a/src/taskbar/taskbar.c b/src/taskbar/taskbar.c index feeb18c..10e0d13 100644 --- a/src/taskbar/taskbar.c +++ b/src/taskbar/taskbar.c @@ -37,7 +37,7 @@ element. However for omnipresent windows (windows which are visible in every taskbar) the array contains to every Task* on each panel a pointer (i.e. GPtrArray.len == server.nb_desktop) */ -GHashTable* win_to_task_table = 0; +GHashTable* win_to_task_table; guint win_hash(gconstpointer key) { return (guint)*((Window*)key); } gboolean win_compare(gconstpointer a, gconstpointer b) { return (*((Window*)a) == *((Window*)b)); } @@ -64,7 +64,7 @@ void init_taskbar() panel->g_taskbar.area.bg = panel->g_taskbar.bg; } if (panel->g_taskbar.bg_active == 0) - panel->g_taskbar.bg_active = &g_array_index(backgrounds, Background, 0); + panel->g_taskbar.bg_active = panel->g_taskbar.bg; if (panel->g_task.area.bg == 0) panel->g_task.area.bg = &g_array_index(backgrounds, Background, 0); @@ -166,13 +166,25 @@ void init_taskbar() } } -void taskbar_remove_task(gpointer key, gpointer value, gpointer user_data) {remove_task(task_get_task(*(Window*)key)); } +void taskbar_remove_task(gpointer key, gpointer value, gpointer user_data) +{ + remove_task(task_get_task(*(Window*)key)); +} + +void default_taskbar() +{ + win_to_task_table = 0; + urgent_timeout = 0; + urgent_list = 0; +} + void cleanup_taskbar() { Panel *panel; Taskbar *tskbar; int i, j; +printf("*** cleanup_taskbar()\n"); if (win_to_task_table) g_hash_table_foreach(win_to_task_table, taskbar_remove_task, 0); for (i=0 ; i < nb_panel ; i++) { panel = &panel1[i];