all repos — tint2 @ 47201cab84a96831abf33119ebd200ecb17d6e6b

fork of the tint2 desktop panel for my custom setup - only minimized windows across all desktops for the taskbar

Taskbar: thumbnails (interleave slow periodic throttling with event processing)
o9000 mrovi9000@gmail.com
commit

47201cab84a96831abf33119ebd200ecb17d6e6b

parent

f7d083904fa9b4880c2be352002aaa1b1bd7e3fc

1 files changed, 13 insertions(+), 1 deletions(-)

jump to
M src/taskbar/taskbar.csrc/taskbar/taskbar.c

@@ -52,6 +52,7 @@ static timeout *thumbnail_update_timer_active;

static timeout *thumbnail_update_timer_tooltip; static GList *taskbar_task_orderings = NULL; +static GList *taskbar_thumbnail_jobs_done = NULL; void taskbar_init_fonts(); int taskbar_compute_desired_size(void *obj);

@@ -91,6 +92,7 @@ always_show_all_desktop_tasks = FALSE;

thumbnail_update_timer_all = NULL; thumbnail_update_timer_active = NULL; thumbnail_update_timer_tooltip = NULL; + taskbar_thumbnail_jobs_done = NULL; taskbar_sort_method = TASKBAR_NOSORT; taskbar_alignment = ALIGN_LEFT; default_taskbarname();

@@ -135,6 +137,7 @@ {

stop_timeout(thumbnail_update_timer_all); stop_timeout(thumbnail_update_timer_active); stop_timeout(thumbnail_update_timer_tooltip); + g_list_free(taskbar_thumbnail_jobs_done); taskbar_save_orderings(); if (win_to_task) { while (g_hash_table_size(win_to_task)) {

@@ -826,9 +829,11 @@ : taskbar->area.children;

c; c = c->next) { Task *t = (Task *)c->data; - if (mode == THUMB_MODE_ALL || (mode == THUMB_MODE_ACTIVE_WINDOW && t->current_state == TASK_ACTIVE) || + if ((mode == THUMB_MODE_ALL && !g_list_find(taskbar_thumbnail_jobs_done, t)) || (mode == THUMB_MODE_ACTIVE_WINDOW && t->current_state == TASK_ACTIVE) || (mode == THUMB_MODE_TOOLTIP_WINDOW && g_tooltip.mapped && g_tooltip.area == &t->area)) { task_refresh_thumbnail(t); + if (mode == THUMB_MODE_ALL) + taskbar_thumbnail_jobs_done = g_list_append(taskbar_thumbnail_jobs_done, t); if (t->thumbnail && mode == THUMB_MODE_TOOLTIP_WINDOW) { taskbar_start_thumbnail_timer(THUMB_MODE_TOOLTIP_WINDOW); }

@@ -841,6 +846,13 @@ return;

} } } + } + } + if (mode == THUMB_MODE_ALL) { + if (taskbar_thumbnail_jobs_done) { + g_list_free(taskbar_thumbnail_jobs_done); + taskbar_thumbnail_jobs_done = NULL; + change_timeout(&thumbnail_update_timer_all, 10 * 1000, 10 * 1000, taskbar_update_thumbnails, arg); } } }