… | |
… | |
143 | { |
143 | { |
144 | } |
144 | } |
145 | |
145 | |
146 | bool rxvt_display::init () |
146 | bool rxvt_display::init () |
147 | { |
147 | { |
|
|
148 | #ifdef LOCAL_X_IS_UNIX |
|
|
149 | if (id[0] == ':') |
|
|
150 | { |
|
|
151 | val = rxvt_malloc (5 + strlen (id) + 1); |
|
|
152 | strcpy (val, "unix/"); |
|
|
153 | strcat (val, id); |
|
|
154 | display = XOpenDisplay (val); |
|
|
155 | printf ("OD %s => %p\n", val, display);//D |
|
|
156 | free (val); |
|
|
157 | } |
|
|
158 | else |
|
|
159 | #endif |
|
|
160 | display = 0; |
|
|
161 | |
|
|
162 | if (!display) |
148 | display = XOpenDisplay (id); |
163 | display = XOpenDisplay (id); |
|
|
164 | printf ("O2 %s => %p\n", id, display);//D |
149 | |
165 | |
150 | if (!display) |
166 | if (!display) |
151 | return false; |
167 | return false; |
152 | |
168 | |
153 | screen = DefaultScreen (display); |
169 | screen = DefaultScreen (display); |
… | |
… | |
231 | (*i)->call (); |
247 | (*i)->call (); |
232 | } |
248 | } |
233 | |
249 | |
234 | void rxvt_display::im_change_check () |
250 | void rxvt_display::im_change_check () |
235 | { |
251 | { |
236 | // make sure we only call im_change_cb when a new input method |
252 | // try to only call im_change_cb when a new input method |
237 | // registers, as xlib crashes due to a race otherwise. |
253 | // registers, as xlib crashes due to a race otherwise. |
238 | Atom actual_type, *atoms; |
254 | Atom actual_type, *atoms; |
239 | int actual_format; |
255 | int actual_format; |
240 | unsigned long nitems, bytes_after; |
256 | unsigned long nitems, bytes_after; |
241 | |
257 | |