From 8329d7e1c50afb3aec64a33e627614517d9a9c3f Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Thu, 24 Jul 2008 18:20:46 +0200 Subject: [PATCH] statusbar: fix color initialization Signed-off-by: Julien Danjou --- statusbar.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/statusbar.c b/statusbar.c index 33c3e294..13387379 100644 --- a/statusbar.c +++ b/statusbar.c @@ -369,15 +369,15 @@ luaA_statusbar_new(lua_State *L) sb->name = a_strdup(buf); + sb->colors.fg = globalconf.colors.fg; if((buf = luaA_getopt_lstring(L, 2, "fg", NULL, &len))) - if(xcolor_init(&sb->colors.fg, globalconf.connection, - globalconf.default_screen, buf, len)) - sb->colors.fg = globalconf.colors.fg; + xcolor_init(&sb->colors.fg, globalconf.connection, + globalconf.default_screen, buf, len); + sb->colors.bg = globalconf.colors.bg; if((buf = luaA_getopt_lstring(L, 2, "bg", NULL, &len))) - if(xcolor_init(&sb->colors.bg, globalconf.connection, - globalconf.default_screen, buf, len)) - sb->colors.bg = globalconf.colors.bg; + xcolor_init(&sb->colors.bg, globalconf.connection, + globalconf.default_screen, buf, len); buf = luaA_getopt_lstring(L, 2, "align", "left", &len); sb->align = draw_align_fromstr(buf, len);