mirror of
https://github.com/Llewellynvdm/conky.git
synced 2025-01-26 08:38:26 +00:00
drop update_x11info()
instead: - call XDefaultScreen() and XScreenCount() directly from the print callback - have no update callback at all for the desktop objects (seems to work well without)
This commit is contained in:
parent
6004ab961a
commit
ef60b7eb8a
@ -49,10 +49,6 @@ void variable_substitute(const char *s, char *dest, unsigned int n);
|
|||||||
void format_seconds(char *buf, unsigned int n, long t);
|
void format_seconds(char *buf, unsigned int n, long t);
|
||||||
void format_seconds_short(char *buf, unsigned int n, long t);
|
void format_seconds_short(char *buf, unsigned int n, long t);
|
||||||
|
|
||||||
#ifdef X11
|
|
||||||
void update_x11info(void);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int round_to_int_temp(float);
|
int round_to_int_temp(float);
|
||||||
|
|
||||||
unsigned int round_to_int(float);
|
unsigned int round_to_int(float);
|
||||||
|
10
src/core.c
10
src/core.c
@ -806,15 +806,15 @@ struct text_object *construct_text_object(const char *s, const char *arg, long
|
|||||||
parse_mixer_arg(obj, arg);
|
parse_mixer_arg(obj, arg);
|
||||||
obj->callbacks.iftest = &check_mixer_muted;
|
obj->callbacks.iftest = &check_mixer_muted;
|
||||||
#ifdef X11
|
#ifdef X11
|
||||||
END OBJ(monitor, &update_x11info)
|
END OBJ(monitor, 0)
|
||||||
obj->callbacks.print = &print_monitor;
|
obj->callbacks.print = &print_monitor;
|
||||||
END OBJ(monitor_number, &update_x11info)
|
END OBJ(monitor_number, 0)
|
||||||
obj->callbacks.print = &print_monitor_number;
|
obj->callbacks.print = &print_monitor_number;
|
||||||
END OBJ(desktop, &update_x11info)
|
END OBJ(desktop, 0)
|
||||||
obj->callbacks.print = &print_desktop;
|
obj->callbacks.print = &print_desktop;
|
||||||
END OBJ(desktop_number, &update_x11info)
|
END OBJ(desktop_number, 0)
|
||||||
obj->callbacks.print = &print_desktop_number;
|
obj->callbacks.print = &print_desktop_number;
|
||||||
END OBJ(desktop_name, &update_x11info)
|
END OBJ(desktop_name, 0)
|
||||||
obj->callbacks.print = &print_desktop_name;
|
obj->callbacks.print = &print_desktop_name;
|
||||||
#endif
|
#endif
|
||||||
END OBJ_ARG(format_time, 0, "format_time needs a pid as argument")
|
END OBJ_ARG(format_time, 0, "format_time needs a pid as argument")
|
||||||
|
@ -680,15 +680,6 @@ void get_x11_desktop_info(Display *current_display, Atom atom)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void update_x11info(void)
|
|
||||||
{
|
|
||||||
struct information *current_info = &info;
|
|
||||||
if (!x_initialised == YES)
|
|
||||||
return;
|
|
||||||
current_info->x11.monitor.number = XScreenCount(display);
|
|
||||||
current_info->x11.monitor.current = XDefaultScreen(display);
|
|
||||||
}
|
|
||||||
|
|
||||||
#define NOT_IN_X "Not running in X"
|
#define NOT_IN_X "Not running in X"
|
||||||
|
|
||||||
void print_monitor(struct text_object *obj, char *p, int p_max_size)
|
void print_monitor(struct text_object *obj, char *p, int p_max_size)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user