]> Dogcows Code - chaz/tint2/blobdiff - src/taskbar/taskbar.c
little cleanup
[chaz/tint2] / src / taskbar / taskbar.c
index 34f49b0a52accebe6e2230d33376c04b930c4ea3..ab6b11d3f029fdf3a7a3354b01a84f9002263d43 100644 (file)
@@ -39,6 +39,9 @@
 */
 GHashTable* win_to_task_table;
 
+Task *task_active;
+Task *task_drag;
+
 guint win_hash(gconstpointer key) { return (guint)*((Window*)key); }
 gboolean win_compare(gconstpointer a, gconstpointer b) { return (*((Window*)a) == *((Window*)b)); }
 void free_ptr_array(gpointer data) { g_ptr_array_free(data, 1); }
@@ -51,6 +54,9 @@ void init_taskbar()
        if (win_to_task_table == 0)
                win_to_task_table = g_hash_table_new_full(win_hash, win_compare, free, free_ptr_array);
 
+       task_active = 0;
+       task_drag = 0;
+
        for (i=0 ; i < nb_panel ; i++) {
                panel = &panel1[i];
 
@@ -142,7 +148,7 @@ void init_taskbar()
                        panel->g_task.maximum_width = server.monitor[panel->monitor].width;
 
                panel->g_task.text_posx = panel->g_task.background[0]->border.width + panel->g_task.area.paddingxlr;
-               panel->g_task.text_posy = (panel->g_task.area.height - height) / 2.0;
+               panel->g_task.text_height = panel->g_task.area.height - (2 * panel->g_task.area.paddingy);
                if (panel->g_task.icon) {
                        panel->g_task.icon_size1 = panel->g_task.area.height - (2 * panel->g_task.area.paddingy);
                        panel->g_task.text_posx += panel->g_task.icon_size1;
This page took 0.02309 seconds and 4 git commands to generate.