Move default color/font initialization out of luaA_parserc

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Michael Gehring 2008-06-08 21:47:35 +02:00 committed by Julien Danjou
parent 0422266818
commit 35d1bc283f
2 changed files with 5 additions and 5 deletions

View File

@ -356,6 +356,11 @@ main(int argc, char **argv)
globalconf.screens = p_new(screen_t, globalconf.screens_info->nscreen); globalconf.screens = p_new(screen_t, globalconf.screens_info->nscreen);
focus_client_push(NULL); focus_client_push(NULL);
/* init default font and colors */
globalconf.font = draw_font_new(globalconf.connection, globalconf.default_screen, "sans 8");
xcolor_new(globalconf.connection, globalconf.default_screen, "black", &globalconf.colors.fg);
xcolor_new(globalconf.connection, globalconf.default_screen, "white", &globalconf.colors.bg);
/* parse config */ /* parse config */
if(!confpath) if(!confpath)
confpath = config_file(); confpath = config_file();

5
lua.c
View File

@ -479,11 +479,6 @@ luaA_parserc(const char *rcfile)
lua_pushliteral(L, VERSION); lua_pushliteral(L, VERSION);
lua_settable(L, LUA_GLOBALSINDEX); lua_settable(L, LUA_GLOBALSINDEX);
/* \todo move this */
globalconf.font = draw_font_new(globalconf.connection, globalconf.default_screen, "sans 8");
xcolor_new(globalconf.connection, globalconf.default_screen, "black", &globalconf.colors.fg);
xcolor_new(globalconf.connection, globalconf.default_screen, "white", &globalconf.colors.bg);
luaA_dostring(L, "package.path = package.path .. \";" AWESOME_LUA_LIB_PATH "/?.lua\""); luaA_dostring(L, "package.path = package.path .. \";" AWESOME_LUA_LIB_PATH "/?.lua\"");
if(luaL_dofile(L, rcfile)) if(luaL_dofile(L, rcfile))