aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/r-x11.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/r-x11.c b/src/r-x11.c
index e869d3b..3094b71 100644
--- a/src/r-x11.c
+++ b/src/r-x11.c
@@ -23,6 +23,7 @@
#include <X11/Xlib.h>
#include "constants.h"
+#include "output.h"
static Atom X_utf8;
@@ -75,8 +76,10 @@ int run_clipboard(const char *data)
XSelectionRequestEvent *sev;
dpy = XOpenDisplay(NULL); // means use env $DISPLAY
- if(!dpy)
- errprint_r(1, "Open X display failed\n");
+ if(!dpy) {
+ print_error("Error: Open X display failed\n");
+ return 1;
+ }
screen = DefaultScreen(dpy);
root = RootWindow(dpy, screen);