]> git.sur5r.net Git - i3/i3/commitdiff
Pass NULL to XkbOpenDisplay, it will read $DISPLAY itself
authorMichael Stapelberg <michael@stapelberg.de>
Fri, 12 Aug 2011 21:09:36 +0000 (23:09 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Fri, 12 Aug 2011 21:09:36 +0000 (23:09 +0200)
i3bar/src/xcb.c

index 1afa8bd150c59d37595aa14d259822baf4b55901..ba7d2346595b2f66b28acd1beacf6c94ccd940bf 100644 (file)
@@ -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,