… | |
… | |
270 | } |
270 | } |
271 | #endif |
271 | #endif |
272 | } |
272 | } |
273 | while (XEventsQueued (display, QueuedAlready)); |
273 | while (XEventsQueued (display, QueuedAlready)); |
274 | |
274 | |
275 | flush (); |
275 | XFlush (display); |
276 | } |
276 | } |
277 | |
277 | |
278 | void rxvt_display::flush () |
278 | void rxvt_display::flush () |
279 | { |
279 | { |
280 | for (;;) |
280 | if (XEventsQueued (display, QueuedAlready)) |
281 | { |
281 | x_cb (x_ev, EVENT_READ); |
282 | if (!XPending (display)) |
|
|
283 | break; |
|
|
284 | |
282 | |
285 | x_cb (x_ev, 0); |
283 | XFlush (display); |
286 | } |
|
|
287 | } |
284 | } |
288 | |
285 | |
289 | void rxvt_display::reg (xevent_watcher *w) |
286 | void rxvt_display::reg (xevent_watcher *w) |
290 | { |
287 | { |
291 | xw.push_back (w); |
288 | xw.push_back (w); |
… | |
… | |
338 | return xim; |
335 | return xim; |
339 | } |
336 | } |
340 | |
337 | |
341 | void rxvt_display::put_xim (rxvt_xim *xim) |
338 | void rxvt_display::put_xim (rxvt_xim *xim) |
342 | { |
339 | { |
|
|
340 | #if XLIB_IS_RACEFREE |
343 | xims.put (xim); |
341 | xims.put (xim); |
|
|
342 | #endif |
344 | } |
343 | } |
345 | #endif |
344 | #endif |
346 | |
345 | |
347 | Atom rxvt_display::atom (const char *name) |
346 | Atom rxvt_display::atom (const char *name) |
348 | { |
347 | { |