Improve reload_config() window destruction/creation.
[monky] / src / x11.c
index 40111d0..e165a4b 100644 (file)
--- a/src/x11.c
+++ b/src/x11.c
@@ -211,6 +211,12 @@ void set_transparent_background(Window win)
        // XClearWindow(display, win); not sure why this was here
 }
 
+void destroy_window(void)
+{
+       XDestroyWindow(display, window.window);
+       memset(&window, 0, sizeof(struct conky_window));
+}
+
 void init_window(int own_window, int w, int h, int set_trans, int back_colour,
                char **argv, int argc)
 {