--- rxvt-unicode/src/rxvttoolkit.C 2004/12/15 00:53:23 1.7 +++ rxvt-unicode/src/rxvttoolkit.C 2005/02/13 11:07:57 1.13 @@ -84,7 +84,7 @@ } template -refcache::~refcache () +void refcache::clear () { while (this->size ()) put (*this->begin ()); @@ -170,6 +170,17 @@ is_local = sa.sun_family == AF_LOCAL; #endif +#ifdef POINTER_BLANK + XColor blackcolour; + blackcolour.red = 0; + blackcolour.green = 0; + blackcolour.blue = 0; + Font f = XLoadFont (display, "fixed"); + blank_cursor = XCreateGlyphCursor (display, f, f, ' ', ' ', + &blackcolour, &blackcolour); + XUnloadFont (display, f); +#endif + #ifdef PREFER_24BIT /* * If depth is not 24, look for a 24bit visual. @@ -205,6 +216,9 @@ rxvt_display::~rxvt_display () { x_ev.stop (); +#ifdef USE_XIM + xims.clear (); +#endif if (display) XCloseDisplay (display); @@ -219,7 +233,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; @@ -272,18 +286,15 @@ } while (XEventsQueued (display, QueuedAlready)); - flush (); + XFlush (display); } void rxvt_display::flush () { - for (;;) - { - if (!XPending (display)) - break; + if (XEventsQueued (display, QueuedAlready)) + x_cb (x_ev, EVENT_READ); - x_cb (x_ev, 0); - } + XFlush (display); } void rxvt_display::reg (xevent_watcher *w) @@ -340,7 +351,9 @@ void rxvt_display::put_xim (rxvt_xim *xim) { +#if XLIB_IS_RACEFREE xims.put (xim); +#endif } #endif