From 9bee219adfc4d434a628abfabed8960750921b2d Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Wed, 20 Jan 2010 00:01:01 +0100 Subject: [PATCH] Make conky not crash when drawing on root window It was failing in XQueryColor because colourmap was NULL. This seemed to help. --- src/x11.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/x11.cc b/src/x11.cc index 689ab4e3..1ad97921 100644 --- a/src/x11.cc +++ b/src/x11.cc @@ -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;