projects
/
suckless
/
slstatus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4dcba6b
)
only open and close display if output type is dwm
author
Aaron Marcher
<info@nulltime.net>
Sat, 17 Sep 2016 14:53:45 +0000
(16:53 +0200)
committer
Aaron Marcher (drkhsh)
<info@nulltime.net>
Sat, 17 Sep 2016 14:53:45 +0000
(16:53 +0200)
slstatus.c
patch
|
blob
|
history
diff --git
a/slstatus.c
b/slstatus.c
index e1d271f7101fce2dd6a2fbbe7317d1c65bfd6661..379be5321af9b228a7f7a14ca923e02e35325d42 100644
(file)
--- a/
slstatus.c
+++ b/
slstatus.c
@@
-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;
}