Use DISPLAY in XKB-code
This commit is contained in:
parent
dfd566511e
commit
7fb6258fbd
|
@ -484,7 +484,11 @@ void init_xcb(char *fontname) {
|
||||||
xkb_major = XkbMajorVersion;
|
xkb_major = XkbMajorVersion;
|
||||||
xkb_minor = XkbMinorVersion;
|
xkb_minor = XkbMinorVersion;
|
||||||
|
|
||||||
xkb_dpy = XkbOpenDisplay(":0",
|
char *dispname = getenv("DISPLAY");
|
||||||
|
if (dispname == NULL) {
|
||||||
|
dispname = ":0";
|
||||||
|
}
|
||||||
|
xkb_dpy = XkbOpenDisplay(dispname,
|
||||||
&xkb_event_base,
|
&xkb_event_base,
|
||||||
&xkb_errbase,
|
&xkb_errbase,
|
||||||
&xkb_major,
|
&xkb_major,
|
||||||
|
|
Loading…
Reference in New Issue