From: Pavel Labath Date: Tue, 19 Jan 2010 23:01:01 +0000 (+0100) Subject: Make conky not crash when drawing on root window X-Git-Url: http://git.maemo.org/git/?p=monky;a=commitdiff_plain;h=fb1ff85d05352953e83d6ffb14bc1e44e31b48af Make conky not crash when drawing on root window It was failing in XQueryColor because colourmap was NULL. This seemed to help. --- diff --git a/src/x11.c b/src/x11.c index 7892b96..fff366d 100644 --- a/src/x11.c +++ b/src/x11.c @@ -531,6 +531,8 @@ void init_window(int own_window, int w, int h, int set_trans, int back_colour, if (!window.window) { window.window = find_desktop_window(&window.root, &window.desktop); } + window.visual = DefaultVisual(display, screen); + window.colourmap = DefaultColormap(display, screen); if (XGetWindowAttributes(display, window.window, &attrs)) { window.width = attrs.width;