1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2025-01-26 00:28:25 +00:00

XCloseDisplay(3) on re-init_X11()

Signed-off-by: Nikos Ntarmos <ntarmos@cs.uoi.gr>
Signed-off-by: Brenden Matthews <brenden@rty.ca>
This commit is contained in:
Nikos Ntarmos 2009-05-28 16:45:15 +03:00 committed by Brenden Matthews
parent ff72a55691
commit 0c62f02553

View File

@ -49,7 +49,7 @@ int use_xdbe;
#endif
/* some basic X11 stuff */
Display *display;
Display *display = NULL;
int display_width;
int display_height;
int screen;
@ -70,6 +70,8 @@ static Window find_subwindow(Window win, int w, int h);
/* X11 initializer */
void init_X11(const char *disp)
{
if (display)
XCloseDisplay(display);
if ((display = XOpenDisplay(disp)) == NULL) {
CRIT_ERR("can't open display: %s", XDisplayName(0));
}