diff --git a/src/conky.c b/src/conky.c index de8e58de..d7d6f434 100644 --- a/src/conky.c +++ b/src/conky.c @@ -6893,6 +6893,10 @@ static void reload_config(void) llua_close(); #endif /* HAVE_LUA */ +#ifdef X11 + X11_destroy_window(); +#endif /* X11 */ + if (current_config) { clear_fs_stats(); load_config_file(current_config); @@ -6905,7 +6909,6 @@ static void reload_config(void) } #ifdef X11 - X11_destroy_window(); x_initialised = NO; #endif /* X11 */ extract_variable_text(global_text); @@ -7247,6 +7250,7 @@ static void X11_create_window(void) #endif /* OWN_WINDOW */ selected_font = 0; + load_fonts(); update_text_area(); /* to position text/window on screen */ #ifdef OWN_WINDOW diff --git a/src/fonts.c b/src/fonts.c index 10f2186b..d9948de8 100644 --- a/src/fonts.c +++ b/src/fonts.c @@ -34,8 +34,9 @@ struct font_list *fonts = NULL; void set_font(void) { - if ((output_methods & TO_X) == 0) + if ((output_methods & TO_X) == 0) { return; + } #ifdef XFT if (use_xft) { if (window.xftdraw != NULL) { @@ -52,8 +53,9 @@ void set_font(void) int addfont(const char *data_in) { - if ((output_methods & TO_X) == 0) + if ((output_methods & TO_X) == 0) { return 0; + } if (font_count > MAX_FONTS) { CRIT_ERR("you don't need that many fonts, sorry."); } @@ -87,8 +89,9 @@ int addfont(const char *data_in) void set_first_font(const char *data_in) { - if ((output_methods & TO_X) == 0) + if ((output_methods & TO_X) == 0) { return; + } if (font_count < 0) { if ((fonts = (struct font_list *) malloc(sizeof(struct font_list))) == NULL) { @@ -109,8 +112,9 @@ void free_fonts(void) { int i; - if ((output_methods & TO_X) == 0) + if ((output_methods & TO_X) == 0) { return; + } for (i = 0; i <= font_count; i++) { #ifdef XFT if (use_xft) { @@ -175,7 +179,6 @@ void load_fonts(void) ERR("can't load font '%s'", fonts[i].name); if ((fonts[i].font = XLoadQueryFont(display, "fixed")) == NULL) { CRIT_ERR("can't load font '%s'", "fixed"); - printf("loaded fixed?\n"); } } }