mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-27 04:32:55 +00:00
Bugfix: "out_to_x no" was ignored when in a file included with ${include path_to_file}
This commit is contained in:
parent
9e3156a4a6
commit
6b3c69882a
70
src/conky.c
70
src/conky.c
@ -3993,6 +3993,37 @@ static void reload_config(void)
|
|||||||
initialisation(argc_copy, argv_copy);
|
initialisation(argc_copy, argv_copy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef X11
|
||||||
|
void clean_up_x11() {
|
||||||
|
if(window_created == 1) {
|
||||||
|
XClearArea(display, window.window, text_start_x - window.border_inner_margin - window.border_outer_margin - window.border_width,
|
||||||
|
text_start_y - window.border_inner_margin - window.border_outer_margin - window.border_width,
|
||||||
|
text_width + window.border_inner_margin * 2 + window.border_outer_margin * 2 + window.border_width * 2,
|
||||||
|
text_height + window.border_inner_margin * 2 + window.border_outer_margin * 2 + window.border_width * 2, 0);
|
||||||
|
}
|
||||||
|
destroy_window();
|
||||||
|
free_fonts();
|
||||||
|
fonts = NULL;
|
||||||
|
if(x11_stuff.region) {
|
||||||
|
XDestroyRegion(x11_stuff.region);
|
||||||
|
x11_stuff.region = NULL;
|
||||||
|
}
|
||||||
|
if(display) {
|
||||||
|
XCloseDisplay(display);
|
||||||
|
display = NULL;
|
||||||
|
}
|
||||||
|
if(info.x11.desktop.all_names) {
|
||||||
|
free(info.x11.desktop.all_names);
|
||||||
|
info.x11.desktop.all_names = NULL;
|
||||||
|
}
|
||||||
|
if (info.x11.desktop.name) {
|
||||||
|
free(info.x11.desktop.name);
|
||||||
|
info.x11.desktop.name = NULL;
|
||||||
|
}
|
||||||
|
x_initialised = NO;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void clean_up(void *memtofree1, void* memtofree2)
|
void clean_up(void *memtofree1, void* memtofree2)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
@ -4020,29 +4051,7 @@ void clean_up(void *memtofree1, void* memtofree2)
|
|||||||
}
|
}
|
||||||
#ifdef X11
|
#ifdef X11
|
||||||
if (x_initialised == YES) {
|
if (x_initialised == YES) {
|
||||||
if(window_created == 1) {
|
clean_up_x11();
|
||||||
XClearArea(display, window.window, text_start_x - window.border_inner_margin - window.border_outer_margin - window.border_width,
|
|
||||||
text_start_y - window.border_inner_margin - window.border_outer_margin - window.border_width,
|
|
||||||
text_width + window.border_inner_margin * 2 + window.border_outer_margin * 2 + window.border_width * 2,
|
|
||||||
text_height + window.border_inner_margin * 2 + window.border_outer_margin * 2 + window.border_width * 2, 0);
|
|
||||||
}
|
|
||||||
destroy_window();
|
|
||||||
free_fonts();
|
|
||||||
if(x11_stuff.region) {
|
|
||||||
XDestroyRegion(x11_stuff.region);
|
|
||||||
x11_stuff.region = NULL;
|
|
||||||
}
|
|
||||||
XCloseDisplay(display);
|
|
||||||
display = NULL;
|
|
||||||
if(info.x11.desktop.all_names) {
|
|
||||||
free(info.x11.desktop.all_names);
|
|
||||||
info.x11.desktop.all_names = NULL;
|
|
||||||
}
|
|
||||||
if (info.x11.desktop.name) {
|
|
||||||
free(info.x11.desktop.name);
|
|
||||||
info.x11.desktop.name = NULL;
|
|
||||||
}
|
|
||||||
x_initialised = NO;
|
|
||||||
}else{
|
}else{
|
||||||
free(fonts); //in set_default_configurations a font is set but not loaded
|
free(fonts); //in set_default_configurations a font is set but not loaded
|
||||||
font_count = -1;
|
font_count = -1;
|
||||||
@ -4574,15 +4583,12 @@ char load_config_file(const char *f)
|
|||||||
|
|
||||||
#ifdef X11
|
#ifdef X11
|
||||||
CONF2("out_to_x") {
|
CONF2("out_to_x") {
|
||||||
/* don't listen if X is already initialised or
|
if (string_to_bool(value)) {
|
||||||
* if we already know we don't want it */
|
output_methods &= TO_X;
|
||||||
if(x_initialised != YES) {
|
} else {
|
||||||
if (string_to_bool(value)) {
|
clean_up_x11();
|
||||||
output_methods &= TO_X;
|
output_methods &= ~TO_X;
|
||||||
} else {
|
x_initialised = NEVER;
|
||||||
output_methods &= ~TO_X;
|
|
||||||
x_initialised = NEVER;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CONF("display") {
|
CONF("display") {
|
||||||
|
Loading…
Reference in New Issue
Block a user