From 221d2c2ed532ee90afc81a1053144b6336f97d95 Mon Sep 17 00:00:00 2001 From: Andreas Fink Date: Sat, 5 Feb 2011 08:32:11 +0000 Subject: [PATCH] *fix* battery: set background_id to 0 if none has been specified --- src/battery/battery.c | 3 +++ src/taskbar/taskbarname.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/battery/battery.c b/src/battery/battery.c index 04c9934..2b4780e 100644 --- a/src/battery/battery.c +++ b/src/battery/battery.c @@ -238,6 +238,9 @@ void init_battery_panel(void *p) if (!battery_enabled) return; + if (battery->area.bg == 0) + battery->area.bg = &g_array_index(backgrounds, Background, 0); + battery->area.parent = p; battery->area.panel = p; battery->area._draw_foreground = draw_battery; diff --git a/src/taskbar/taskbarname.c b/src/taskbar/taskbarname.c index 12866c7..4f8d19f 100644 --- a/src/taskbar/taskbarname.c +++ b/src/taskbar/taskbarname.c @@ -52,7 +52,7 @@ void init_taskbarname_panel(void *p) int j; if (!taskbarname_enabled) return; - + GSList *l, *list = server_get_name_of_desktop(); for (j=0, l=list ; j < panel->nb_desktop ; j++) { tskbar = &panel->taskbar[j]; -- 2.45.2