1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-15 09:44:04 +00:00

Make conky not crash when drawing on root window

It was failing in XQueryColor because colourmap was NULL. This seemed to help.
This commit is contained in:
Pavel Labath 2010-01-20 00:01:01 +01:00
parent bdc8200a21
commit fb1ff85d05

View File

@ -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;