statusbar: fix color initialization

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-07-24 18:20:46 +02:00
parent 909b55db2e
commit 8329d7e1c5
1 changed files with 6 additions and 6 deletions

View File

@ -369,15 +369,15 @@ luaA_statusbar_new(lua_State *L)
sb->name = a_strdup(buf); sb->name = a_strdup(buf);
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; sb->colors.fg = globalconf.colors.fg;
if((buf = luaA_getopt_lstring(L, 2, "fg", NULL, &len)))
xcolor_init(&sb->colors.fg, globalconf.connection,
globalconf.default_screen, buf, len);
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; sb->colors.bg = globalconf.colors.bg;
if((buf = luaA_getopt_lstring(L, 2, "bg", NULL, &len)))
xcolor_init(&sb->colors.bg, globalconf.connection,
globalconf.default_screen, buf, len);
buf = luaA_getopt_lstring(L, 2, "align", "left", &len); buf = luaA_getopt_lstring(L, 2, "align", "left", &len);
sb->align = draw_align_fromstr(buf, len); sb->align = draw_align_fromstr(buf, len);