--- rxvt-unicode/src/rxvtcolor.C 2004/04/08 20:31:45 1.14 +++ rxvt-unicode/src/rxvtcolor.C 2004/07/30 14:12:38 1.18 @@ -57,7 +57,7 @@ template T *refcache::get (const char *id) { - for (T **i = begin (); i < end (); ++i) + for (T **i = this->begin (); i < this->end (); ++i) { if (!strcmp (id, (*i)->id)) { @@ -72,7 +72,7 @@ if (obj && obj->init ()) { - push_back (obj); + this->push_back (obj); return obj; } else @@ -90,7 +90,7 @@ if (!--obj->referenced) { - erase (find (begin (), end (), obj)); + this->erase (find (this->begin (), this->end (), obj)); delete obj; } } @@ -98,12 +98,13 @@ template refcache::~refcache () { - while (size ()) - put (*begin ()); + while (this->size ()) + put (*this->begin ()); } ///////////////////////////////////////////////////////////////////////////// +#ifdef USE_XIM static void im_destroy_cb (XIM unused1, XPointer client_data, XPointer unused3) { @@ -138,6 +139,7 @@ if (xim) XCloseIM (xim); } +#endif ///////////////////////////////////////////////////////////////////////////// @@ -185,7 +187,9 @@ fcntl (fd, F_SETFD, FD_CLOEXEC); XSelectInput (display, root, PropertyChangeMask); +#ifdef USE_XIM xa_xim_servers = XInternAtom (display, "XIM_SERVERS", 0); +#endif flush (); @@ -200,11 +204,13 @@ XCloseDisplay (display); } +#ifdef USE_XIM void rxvt_display::im_change_cb () { for (im_watcher **i = imw.begin (); i != imw.end (); ++i) (*i)->call (); } +#endif void rxvt_display::x_cb (io_watcher &w, short revents) { @@ -215,10 +221,12 @@ //printf ("T %d w %lx\n", xev.type, xev.xany.window);//D +#ifdef USE_XIM if (xev.type == PropertyNotify && xev.xany.window == root && xev.xproperty.atom == xa_xim_servers) im_change_cb (); +#endif for (int i = xw.size (); i--; ) { @@ -258,6 +266,15 @@ xw[w->active - 1] = 0; } +void rxvt_display::set_selection_owner (rxvt_term *owner) +{ + if (selection_owner && selection_owner != owner) + selection_owner->selection_clear (); + + selection_owner = owner; +} + +#ifdef USE_XIM void rxvt_display::reg (im_watcher *w) { imw.push_back (w); @@ -268,14 +285,6 @@ imw.erase (find (imw.begin (), imw.end (), w)); } -void rxvt_display::set_selection_owner (rxvt_term *owner) -{ - if (selection_owner && selection_owner != owner) - selection_owner->selection_clear (); - - selection_owner = owner; -} - rxvt_xim *rxvt_display::get_xim (const char *locale, const char *modifiers) { char *id; @@ -301,6 +310,7 @@ { xims.put (xim); } +#endif Atom rxvt_display::atom (const char *name) { @@ -309,7 +319,7 @@ ///////////////////////////////////////////////////////////////////////////// -template refcache; +template class refcache; refcache displays; /////////////////////////////////////////////////////////////////////////////