Use DISPLAY in XKB-code

This commit is contained in:
Axel Wagner 2011-03-14 09:20:16 +01:00
parent dfd566511e
commit 7fb6258fbd
1 changed files with 5 additions and 1 deletions

View File

@ -484,7 +484,11 @@ void init_xcb(char *fontname) {
xkb_major = XkbMajorVersion;
xkb_minor = XkbMinorVersion;
xkb_dpy = XkbOpenDisplay(":0",
char *dispname = getenv("DISPLAY");
if (dispname == NULL) {
dispname = ":0";
}
xkb_dpy = XkbOpenDisplay(dispname,
&xkb_event_base,
&xkb_errbase,
&xkb_major,