Pass NULL to XkbOpenDisplay, it will read $DISPLAY itself

This commit is contained in:
Michael Stapelberg 2011-08-12 23:09:36 +02:00
parent 3892d616cf
commit 72ef8a7c19
1 changed files with 1 additions and 5 deletions

View 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,