only open and close display if output type is dwm
Aaron Marcher info@nulltime.net
Sat, 17 Sep 2016 16:53:45 +0200
1 files changed,
4 insertions(+),
3 deletions(-)
jump to
M
slstatus.c
→
slstatus.c
@@ -633,7 +633,9 @@ act.sa_handler = sighandler;
sigaction(SIGINT, &act, 0); sigaction(SIGTERM, &act, 0); - dpy = XOpenDisplay(NULL); + if (!oflag) { + dpy = XOpenDisplay(NULL); + } while (!done) { status_string[0] = '\0';@@ -671,9 +673,8 @@ }
if (!oflag) { set_status(NULL); + XCloseDisplay(dpy); } - - XCloseDisplay(dpy); return 0; }