--- rxvt-unicode/src/main.C 2004/08/04 03:29:28 1.76 +++ rxvt-unicode/src/main.C 2004/08/13 19:31:23 1.80 @@ -142,9 +142,9 @@ rxvt_term::rxvt_term () : +#if TRANSPARENT rootwin_ev (this, &rxvt_term::rootwin_cb), - termwin_ev (this, &rxvt_term::x_cb), - vt_ev (this, &rxvt_term::x_cb), +#endif #ifdef HAVE_SCROLLBARS scrollbar_ev (this, &rxvt_term::x_cb), #endif @@ -172,6 +172,8 @@ #ifdef USE_XIM im_ev (this, &rxvt_term::im_cb), #endif + termwin_ev (this, &rxvt_term::x_cb), + vt_ev (this, &rxvt_term::x_cb), check_ev (this, &rxvt_term::check_cb), flush_ev (this, &rxvt_term::flush_cb), destroy_ev (this, &rxvt_term::destroy_cb), @@ -203,6 +205,9 @@ { selection_clear (); +#ifdef USE_XIM + im_destroy (); +#endif #ifdef MENUBAR if (menubarGC) XFreeGC (display->display, menubarGC); #endif @@ -276,21 +281,26 @@ 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 (); +#if USE_XIM im_ev.stop (display); #endif -#ifdef HAVE_SCROLLBARS +#if HAVE_SCROLLBARS scrollbar_ev.stop (display); #endif -#ifdef MENUBAR +#if MENUBAR menubar_ev.stop (display); #endif +#if TRANSPARENT + rootwin_ev.stop (display); +#endif + incr_ev.stop (); + termwin_ev.stop (display); + vt_ev.stop (display); } check_ev.stop (); @@ -379,11 +389,10 @@ { XSelectInput (display->display, display->root, PropertyChangeMask); check_our_parents (); + rootwin_ev.start (display, display->root); } #endif - rootwin_ev.start (display, display->root); - XMapWindow (display->display, TermWin.vt); XMapWindow (display->display, TermWin.parent[0]); @@ -1233,6 +1242,7 @@ if (height == 0) height = wattr.height - szHint.base_height; } + if (width != TermWin.width || height != TermWin.height) { width += szHint.base_width;