Taskbar: setup timers in init_() to allow restart
o9000 mrovi9000@gmail.com
3 files changed,
6 insertions(+),
6 deletions(-)
M
src/init.c
→
src/init.c
@@ -267,6 +267,7 @@ #ifdef ENABLE_BATTERY
cleanup_battery(); #endif cleanup_separator(); + cleanup_taskbar(); cleanup_panel(); cleanup_config();
M
src/panel.c
→
src/panel.c
@@ -130,8 +130,6 @@ {
if (!panels) return; - cleanup_taskbar(); - for (int i = 0; i < num_panels; i++) { Panel *p = &panels[i];
M
src/taskbar/taskbar.c
→
src/taskbar/taskbar.c
@@ -80,7 +80,6 @@
void default_taskbar() { win_to_task = NULL; - INIT_TIMER(urgent_timer); urgent_list = NULL; taskbar_enabled = FALSE; taskbar_distribute_size = FALSE;@@ -89,9 +88,6 @@ hide_inactive_tasks = FALSE;
hide_task_diff_monitor = FALSE; hide_taskbar_if_empty = 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_sort_method = TASKBAR_NOSORT; taskbar_alignment = ALIGN_LEFT;@@ -184,6 +180,11 @@ }
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) { panel_config.g_task.has_text = panel_config.g_task.has_icon = 1; }