int selected_font = 0;
int font_count = -1;
struct font_list *fonts = NULL;
+char fontloaded = 0;
void set_font(void)
{
{
int i;
- if ((output_methods & TO_X) == 0) {
+ if ((output_methods & TO_X) == 0 || fontloaded == 0) {
return;
}
for (i = 0; i <= font_count; i++) {
}
}
}
+ fontloaded = 1;
}
{
lua_newtable(lua_L);
+/* TODO fix this: (segfaults)
llua_set_userdata("drawable", "Drawable", (void*)&window.drawable);
llua_set_userdata("visual", "Visual", window.visual);
llua_set_userdata("display", "Display", display);
+*/
llua_set_long("width", window.width);
llua_set_long("height", window.height);
void llua_update_window_table(int text_start_x, int text_start_y, int text_width, int text_height)
{
+ llua_init(); //needed because sometimes lua isn't initialised resulting in segfaults
lua_getglobal(lua_L, "conky_window");
if (lua_isnil(lua_L, -1)) {
/* window table isn't populated yet */