--- rxvt-unicode/src/main.C 2004/07/30 14:59:12 1.73 +++ rxvt-unicode/src/main.C 2004/08/10 20:39:19 1.77 @@ -173,6 +173,7 @@ im_ev (this, &rxvt_term::im_cb), #endif check_ev (this, &rxvt_term::check_cb), + flush_ev (this, &rxvt_term::flush_cb), destroy_ev (this, &rxvt_term::destroy_cb), pty_ev (this, &rxvt_term::pty_cb), incr_ev (this, &rxvt_term::incr_cb) @@ -202,6 +203,9 @@ { selection_clear (); +#ifdef USE_XIM + im_destroy (); +#endif #ifdef MENUBAR if (menubarGC) XFreeGC (display->display, menubarGC); #endif @@ -275,13 +279,12 @@ void rxvt_term::destroy () { + if (destroy_ev.active) + return; + if (display) { - rootwin_ev.stop (display); - termwin_ev.stop (display); - vt_ev.stop (display); #ifdef USE_XIM - im_destroy (); im_ev.stop (display); #endif #ifdef HAVE_SCROLLBARS @@ -290,6 +293,9 @@ #ifdef MENUBAR menubar_ev.stop (display); #endif + rootwin_ev.stop (display); + termwin_ev.stop (display); + vt_ev.stop (display); } check_ev.stop (); @@ -888,6 +894,9 @@ scr_touch (true); } + for (unicode_t ch = 0x20; ch <= 0x7f; ch++) + TermWin.ascii_map [ch - 0x20] = fs->find_font (ch); + return true; } } @@ -977,7 +986,7 @@ if (!rXParseAllocColor (& xcol, color)) return; - /* XStoreColor (display->display, XCMAP, XColor*); */ + /* XStoreColor (display->display, display->cmap, XColor*); */ /* * FIXME: should free colors here, but no idea how to do it so instead, @@ -990,7 +999,7 @@ if (i > Color_White) { /* fprintf (stderr, "XFreeColors: PixColors [%d] = %lu\n", idx, PixColors [idx]); */ - XFreeColors (display->display, XCMAP, (PixColors + idx), 1, + XFreeColors (display->display, display->cmap, (PixColors + idx), 1, DisplayPlanes (display->display, display->screen)); } # endif @@ -1025,7 +1034,7 @@ xcol[0].pixel = ISSET_PIXCOLOR (Color_pointer_fg) ? PixColorsFocused[Color_pointer_fg] : PixColorsFocused[Color_fg]; xcol[1].pixel = ISSET_PIXCOLOR (Color_pointer_bg) ? PixColorsFocused[Color_pointer_bg] : PixColorsFocused[Color_bg]; - XQueryColors (display->display, XCMAP, xcol, 2); + XQueryColors (display->display, display->cmap, xcol, 2); XRecolorCursor (display->display, TermWin_cursor, xcol + 0, xcol + 1); }