From 909b55db2e2c30e4c73382fcbcf371c82a8a6023 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Thu, 24 Jul 2008 18:18:18 +0200 Subject: [PATCH] titlebar: fix color initialization Signed-off-by: Julien Danjou --- titlebar.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/titlebar.c b/titlebar.c index f5379c90..f05631de 100644 --- a/titlebar.c +++ b/titlebar.c @@ -314,20 +314,20 @@ luaA_titlebar_new(lua_State *L) buf = luaA_getopt_lstring(L, 2, "position", "top", &len); tb->position = position_fromstr(buf, len); + tb->colors.fg = globalconf.colors.fg; if((buf = luaA_getopt_lstring(L, 2, "fg", NULL, &len))) - if(xcolor_init(&tb->colors.fg, globalconf.connection, - globalconf.default_screen, buf, len)) - tb->colors.fg = globalconf.colors.fg; + xcolor_init(&tb->colors.fg, globalconf.connection, + globalconf.default_screen, buf, len); + tb->colors.bg = globalconf.colors.bg; if((buf = luaA_getopt_lstring(L, 2, "bg", NULL, &len))) - if(xcolor_init(&tb->colors.bg, globalconf.connection, - globalconf.default_screen, buf, len)) - tb->colors.bg = globalconf.colors.bg; + xcolor_init(&tb->colors.bg, globalconf.connection, + globalconf.default_screen, buf, len); + tb->border.color = globalconf.colors.fg; if((buf = luaA_getopt_lstring(L, 2, "border_color", NULL, &len))) - if(xcolor_init(&tb->border.color, globalconf.connection, - globalconf.default_screen, buf, len)) - tb->border.color = globalconf.colors.fg; + xcolor_init(&tb->border.color, globalconf.connection, + globalconf.default_screen, buf, len); tb->border.width = luaA_getopt_number(L, 2, "border_width", 0);