Taskbar: setup timers in init_() to allow restart

This commit is contained in:
o9000 2017-12-29 14:38:06 +01:00
parent 5ee278d3ca
commit eb0e6765f9
3 changed files with 6 additions and 6 deletions

View file

@ -267,6 +267,7 @@ void cleanup()
cleanup_battery(); cleanup_battery();
#endif #endif
cleanup_separator(); cleanup_separator();
cleanup_taskbar();
cleanup_panel(); cleanup_panel();
cleanup_config(); cleanup_config();

View file

@ -130,8 +130,6 @@ void cleanup_panel()
if (!panels) if (!panels)
return; return;
cleanup_taskbar();
for (int i = 0; i < num_panels; i++) { for (int i = 0; i < num_panels; i++) {
Panel *p = &panels[i]; Panel *p = &panels[i];

View file

@ -80,7 +80,6 @@ void free_ptr_array(gpointer data)
void default_taskbar() void default_taskbar()
{ {
win_to_task = NULL; win_to_task = NULL;
INIT_TIMER(urgent_timer);
urgent_list = NULL; urgent_list = NULL;
taskbar_enabled = FALSE; taskbar_enabled = FALSE;
taskbar_distribute_size = FALSE; taskbar_distribute_size = FALSE;
@ -89,9 +88,6 @@ void default_taskbar()
hide_task_diff_monitor = FALSE; hide_task_diff_monitor = FALSE;
hide_taskbar_if_empty = FALSE; hide_taskbar_if_empty = FALSE;
always_show_all_desktop_tasks = FALSE; always_show_all_desktop_tasks = FALSE;
INIT_TIMER(thumbnail_update_timer_all);
INIT_TIMER(thumbnail_update_timer_active);
INIT_TIMER(thumbnail_update_timer_tooltip);
taskbar_thumbnail_jobs_done = NULL; taskbar_thumbnail_jobs_done = NULL;
taskbar_sort_method = TASKBAR_NOSORT; taskbar_sort_method = TASKBAR_NOSORT;
taskbar_alignment = ALIGN_LEFT; taskbar_alignment = ALIGN_LEFT;
@ -184,6 +180,11 @@ void cleanup_taskbar()
void init_taskbar() void init_taskbar()
{ {
INIT_TIMER(urgent_timer);
INIT_TIMER(thumbnail_update_timer_all);
INIT_TIMER(thumbnail_update_timer_active);
INIT_TIMER(thumbnail_update_timer_tooltip);
if (!panel_config.g_task.has_text && !panel_config.g_task.has_icon) { if (!panel_config.g_task.has_text && !panel_config.g_task.has_icon) {
panel_config.g_task.has_text = panel_config.g_task.has_icon = 1; panel_config.g_task.has_text = panel_config.g_task.has_icon = 1;
} }