From 2b8b9fc08fbc53301a2cebbd0a16064c64b9e58d Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Sun, 29 Jun 2008 13:01:23 +0200 Subject: [PATCH] titlebar: fix index Signed-off-by: Julien Danjou --- titlebar.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/titlebar.c b/titlebar.c index 06b210e5..dff41537 100644 --- a/titlebar.c +++ b/titlebar.c @@ -314,17 +314,17 @@ luaA_titlebar_new(lua_State *L) buf = luaA_getopt_lstring(L, 1, "position", "top", &len); tb->position = position_fromstr(buf, len); - if(!(buf = luaA_getopt_string(L, -1, "fg", NULL)) + if(!(buf = luaA_getopt_string(L, 1, "fg", NULL)) || !xcolor_new(globalconf.connection, globalconf.default_screen, buf, &tb->colors.fg)) tb->colors.fg = xcolor_copy(&globalconf.colors.fg); - if(!(buf = luaA_getopt_string(L, -1, "bg", NULL)) + if(!(buf = luaA_getopt_string(L, 1, "bg", NULL)) || !xcolor_new(globalconf.connection, globalconf.default_screen, buf, &tb->colors.bg)) tb->colors.bg = xcolor_copy(&globalconf.colors.bg); - if(!(buf = luaA_getopt_string(L, -1, "border_color", NULL)) + if(!(buf = luaA_getopt_string(L, 1, "border_color", NULL)) || !xcolor_new(globalconf.connection, globalconf.default_screen, buf, &tb->border.color)) tb->border.color = xcolor_copy(&globalconf.colors.fg);