mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-18 02:55:12 +00:00
Merge branch 'master' of git.omp.am:/home/omp/git/conky
This commit is contained in:
commit
14c30feaea
@ -8072,6 +8072,7 @@ static void load_config_file(const char *f)
|
|||||||
} else {
|
} else {
|
||||||
output_methods &= ~TO_X;
|
output_methods &= ~TO_X;
|
||||||
x_initialised = NEVER;
|
x_initialised = NEVER;
|
||||||
|
free(fonts); //in set_default_configurations a font is set
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
int selected_font = 0;
|
int selected_font = 0;
|
||||||
int font_count = -1;
|
int font_count = -1;
|
||||||
struct font_list *fonts = NULL;
|
struct font_list *fonts = NULL;
|
||||||
|
char fontloaded = 0;
|
||||||
|
|
||||||
void set_font(void)
|
void set_font(void)
|
||||||
{
|
{
|
||||||
@ -120,7 +121,7 @@ void free_fonts(void)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if ((output_methods & TO_X) == 0) {
|
if ((output_methods & TO_X) == 0 || fontloaded == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (i = 0; i <= font_count; i++) {
|
for (i = 0; i <= font_count; i++) {
|
||||||
@ -189,4 +190,5 @@ void load_fonts(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
fontloaded = 1;
|
||||||
}
|
}
|
||||||
|
@ -428,9 +428,11 @@ void llua_setup_window_table(int text_start_x, int text_start_y, int text_width,
|
|||||||
{
|
{
|
||||||
lua_newtable(lua_L);
|
lua_newtable(lua_L);
|
||||||
|
|
||||||
|
/* TODO fix this: (segfaults)
|
||||||
llua_set_userdata("drawable", "Drawable", (void*)&window.drawable);
|
llua_set_userdata("drawable", "Drawable", (void*)&window.drawable);
|
||||||
llua_set_userdata("visual", "Visual", window.visual);
|
llua_set_userdata("visual", "Visual", window.visual);
|
||||||
llua_set_userdata("display", "Display", display);
|
llua_set_userdata("display", "Display", display);
|
||||||
|
*/
|
||||||
|
|
||||||
llua_set_long("width", window.width);
|
llua_set_long("width", window.width);
|
||||||
llua_set_long("height", window.height);
|
llua_set_long("height", window.height);
|
||||||
@ -448,6 +450,7 @@ void llua_setup_window_table(int text_start_x, int text_start_y, int text_width,
|
|||||||
|
|
||||||
void llua_update_window_table(int text_start_x, int text_start_y, int text_width, int text_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");
|
lua_getglobal(lua_L, "conky_window");
|
||||||
if (lua_isnil(lua_L, -1)) {
|
if (lua_isnil(lua_L, -1)) {
|
||||||
/* window table isn't populated yet */
|
/* window table isn't populated yet */
|
||||||
|
Loading…
Reference in New Issue
Block a user