1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-12-26 20:31:17 +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 926af1041e
commit 9bee219adf

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;