--- rxvt-unicode/src/rxvttoolkit.C 2005/01/17 00:59:24 1.12 +++ rxvt-unicode/src/rxvttoolkit.C 2005/07/13 00:51:47 1.16 @@ -145,7 +145,21 @@ bool rxvt_display::init () { - display = XOpenDisplay (id); +#ifdef LOCAL_X_IS_UNIX + if (id[0] == ':') + { + val = rxvt_malloc (5 + strlen (id) + 1); + strcpy (val, "unix/"); + strcat (val, id); + display = XOpenDisplay (val); + free (val); + } + else +#endif + display = 0; + + if (!display) + display = XOpenDisplay (id); if (!display) return false; @@ -233,7 +247,7 @@ void rxvt_display::im_change_check () { - // make sure we only call im_change_cb when a new input method + // try to only call im_change_cb when a new input method // registers, as xlib crashes due to a race otherwise. Atom actual_type, *atoms; int actual_format;