diff options
author | Aaron Marcher <info@nulltime.net> | 2016-09-17 16:53:45 +0200 |
---|---|---|
committer | Aaron Marcher (drkhsh) <info@nulltime.net> | 2016-09-17 16:53:45 +0200 |
commit | 2e012d533e49c55c79f808fa213e91d15fb64568 (patch) | |
tree | f38e37a5908bd6c1a9d80affa778c9162390e9bc | |
parent | 4dcba6b7e8219e6f06be344aba2035263c5cf3c8 (diff) |
only open and close display if output type is dwm
-rw-r--r-- | slstatus.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -633,7 +633,9 @@ main(int argc, char *argv[]) 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 @@ main(int argc, char *argv[]) if (!oflag) { set_status(NULL); + XCloseDisplay(dpy); } - XCloseDisplay(dpy); - return 0; } |