mirror of
https://github.com/Llewellynvdm/conky.git
synced 2025-01-27 17:18:33 +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:
parent
ff72a55691
commit
0c62f02553
@ -49,7 +49,7 @@ int use_xdbe;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* some basic X11 stuff */
|
/* some basic X11 stuff */
|
||||||
Display *display;
|
Display *display = NULL;
|
||||||
int display_width;
|
int display_width;
|
||||||
int display_height;
|
int display_height;
|
||||||
int screen;
|
int screen;
|
||||||
@ -70,6 +70,8 @@ static Window find_subwindow(Window win, int w, int h);
|
|||||||
/* X11 initializer */
|
/* X11 initializer */
|
||||||
void init_X11(const char *disp)
|
void init_X11(const char *disp)
|
||||||
{
|
{
|
||||||
|
if (display)
|
||||||
|
XCloseDisplay(display);
|
||||||
if ((display = XOpenDisplay(disp)) == NULL) {
|
if ((display = XOpenDisplay(disp)) == NULL) {
|
||||||
CRIT_ERR("can't open display: %s", XDisplayName(0));
|
CRIT_ERR("can't open display: %s", XDisplayName(0));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user