mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-26 12:27:52 +00:00
x11, imlib2: early-exit in some X functions if X is not available at runtime
This commit is contained in:
parent
a30cc64a98
commit
1eb88aeb43
@ -140,6 +140,9 @@ struct _x11_stuff_s {
|
|||||||
} x11_stuff;
|
} x11_stuff;
|
||||||
|
|
||||||
static void X11_create_window() {
|
static void X11_create_window() {
|
||||||
|
if (!window.window) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
setup_fonts();
|
setup_fonts();
|
||||||
load_fonts(utf8_mode.get(*state));
|
load_fonts(utf8_mode.get(*state));
|
||||||
#ifdef BUILD_XFT
|
#ifdef BUILD_XFT
|
||||||
|
@ -70,6 +70,9 @@ void imlib_cache_size_setting::lua_setter(lua::state &l, bool init) {
|
|||||||
|
|
||||||
Base::lua_setter(l, init);
|
Base::lua_setter(l, init);
|
||||||
|
|
||||||
|
if (display == nullptr || window.visual == nullptr)
|
||||||
|
return;
|
||||||
|
|
||||||
if (init && out_to_x.get(l)) {
|
if (init && out_to_x.get(l)) {
|
||||||
image_list_start = image_list_end = nullptr;
|
image_list_start = image_list_end = nullptr;
|
||||||
context = imlib_context_new();
|
context = imlib_context_new();
|
||||||
|
@ -324,6 +324,8 @@ static Window find_desktop_window(Window *p_root, Window *p_desktop) {
|
|||||||
int format, i;
|
int format, i;
|
||||||
unsigned long nitems, bytes;
|
unsigned long nitems, bytes;
|
||||||
unsigned int n;
|
unsigned int n;
|
||||||
|
if (!display)
|
||||||
|
return 0;
|
||||||
Window root = RootWindow(display, screen);
|
Window root = RootWindow(display, screen);
|
||||||
Window win;
|
Window win;
|
||||||
Window troot, parent, *children;
|
Window troot, parent, *children;
|
||||||
|
Loading…
Reference in New Issue
Block a user