X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2Ftaskbar%2Ftask.c;h=d704f3522ea21ed92af7f3cb45f71d0f5eaaf3fb;hb=6e43e34c910adffa3f15aad56250b651e5966263;hp=2c039ab4daa01df24db1c1675a30a8dc18b9f314;hpb=1ef906db6652330521262656e65873ad697341d4;p=chaz%2Ftint2 diff --git a/src/taskbar/task.c b/src/taskbar/task.c index 2c039ab..d704f35 100644 --- a/src/taskbar/task.c +++ b/src/taskbar/task.c @@ -77,11 +77,8 @@ void add_task (Window win) new_tsk2->icon_width = new_tsk.icon_width; new_tsk2->icon_height = new_tsk.icon_height; tskbar->area.list = g_slist_append(tskbar->area.list, new_tsk2); - + tskbar->area.resize = 1; //printf("add_task panel %d, desktop %d, task %s\n", i, j, new_tsk2->title); - // set_resize (&tskbar->area); - if (resize_tasks (tskbar)) - set_redraw (&tskbar->area); } } } @@ -97,7 +94,6 @@ void remove_task (Task *tsk) // 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); - //printf("remove_task %s \n", tsk->title); if (tsk->title) free (tsk->title); if (tsk->icon_data) @@ -117,8 +113,7 @@ void remove_task (Task *tsk) l0 = l0->next; if (win == tsk2->win) { tskbar->area.list = g_slist_remove(tskbar->area.list, tsk2); - set_resize (&tskbar->area); - set_redraw (&tskbar->area); + tskbar->area.resize = 1; if (tsk2 == task_active) task_active = 0; @@ -288,7 +283,7 @@ void draw_task_icon (Task *tsk, int text_width, int active) } -void draw_foreground_task (void *obj, cairo_t *c, int active) +void draw_task (void *obj, cairo_t *c, int active) { Task *tsk = obj; PangoLayout *layout; @@ -303,6 +298,7 @@ void draw_foreground_task (void *obj, cairo_t *c, int active) pango_layout_set_text (layout, tsk->title, -1); /* Drawing width and Cut text */ + // pango use U+22EF or U+2026 pango_layout_set_width (layout, ((Taskbar*)tsk->area.parent)->text_width * PANGO_SCALE); pango_layout_set_ellipsize (layout, PANGO_ELLIPSIZE_END);