about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChris Down <chris@chrisdown.name>2018-02-08 00:33:13 +0000
committerChris Down <chris@chrisdown.name>2018-02-08 00:41:55 +0000
commit71c1ada1a477e010acd7d694ab6aa981d3b68252 (patch)
tree769146c7b669f28b33b1e05f485ee8090b6ceb0f
parentfe54c842ca505ae4c8fc2c5cbc336cecbb8e7965 (diff)
downloadclipbuzz-71c1ada1a477e010acd7d694ab6aa981d3b68252.tar.gz
Close display on exit
-rw-r--r--clipnotify.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/clipnotify.c b/clipnotify.c
index 8adac43..f09583e 100644
--- a/clipnotify.c
+++ b/clipnotify.c
@@ -1,8 +1,8 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <X11/Xlib.h>
 #include <X11/Xatom.h>
+#include <X11/Xlib.h>
 #include <X11/extensions/Xfixes.h>
+#include <stdio.h>
+#include <stdlib.h>
 
 int main(void) {
     Display *disp;
@@ -24,6 +24,5 @@ int main(void) {
     XFixesSelectSelectionInput(disp, root, clip, XFixesSetSelectionOwnerNotifyMask);
 
     XNextEvent(disp, &evt);
-
-    return 0;
+    XCloseDisplay(disp);
 }