From 72ef8a7c196871e0627a976317297d67e87daa47 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Fri, 12 Aug 2011 23:09:36 +0200 Subject: [PATCH] Pass NULL to XkbOpenDisplay, it will read $DISPLAY itself --- i3bar/src/xcb.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/i3bar/src/xcb.c b/i3bar/src/xcb.c index 1afa8bd1..ba7d2346 100644 --- a/i3bar/src/xcb.c +++ b/i3bar/src/xcb.c @@ -506,11 +506,7 @@ char *init_xcb(char *fontname) { xkb_major = XkbMajorVersion; xkb_minor = XkbMinorVersion; - char *dispname = getenv("DISPLAY"); - if (dispname == NULL) { - dispname = ":0"; - } - xkb_dpy = XkbOpenDisplay(dispname, + xkb_dpy = XkbOpenDisplay(NULL, &xkb_event_base, &xkb_errbase, &xkb_major, -- 2.39.5