--- rxvt-unicode/src/main.C 2007/11/24 11:06:13 1.264 +++ rxvt-unicode/src/main.C 2007/12/04 14:50:42 1.269 @@ -155,15 +155,9 @@ rxvt_term::rxvt_term () : -#if ENABLE_TRANSPARENCY || ENABLE_PERL - rootwin_ev (this, &rxvt_term::rootwin_cb), -#endif #if HAVE_BG_PIXMAP update_background_ev(this, &rxvt_term::update_background_cb), #endif -#ifdef HAVE_SCROLLBARS - scrollbar_ev (this, &rxvt_term::x_cb), -#endif #ifdef CURSOR_BLINK cursor_blink_ev (this, &rxvt_term::cursor_blink_cb), #endif @@ -182,14 +176,9 @@ #ifdef POINTER_BLANK pointer_ev (this, &rxvt_term::pointer_cb), #endif -#ifdef USE_XIM - im_ev (this, &rxvt_term::im_cb), -#endif #ifndef NO_BELL bell_ev (this, &rxvt_term::bell_cb), #endif - termwin_ev (this, &rxvt_term::x_cb), - vt_ev (this, &rxvt_term::x_cb), child_ev (this, &rxvt_term::child_cb), prepare_ev (this, &rxvt_term::prepare_cb), flush_ev (this, &rxvt_term::flush_cb), @@ -197,6 +186,18 @@ pty_ev (this, &rxvt_term::pty_cb), incr_ev (this, &rxvt_term::incr_cb) { +#if ENABLE_TRANSPARENCY || ENABLE_PERL + callback_set (rootwin_ev , this, rxvt_term, rootwin_cb); +#endif +#ifdef HAVE_SCROLLBARS + callback_set (scrollbar_ev, this, rxvt_term, x_cb); +#endif +#ifdef USE_XIM + callback_set (im_ev , this, rxvt_term, im_cb); +#endif + callback_set (termwin_ev , this, rxvt_term, x_cb); + callback_set (vt_ev , this, rxvt_term, x_cb); + cmdbuf_ptr = cmdbuf_endp = cmdbuf_base; termlist.push_back (this); @@ -981,14 +982,15 @@ i = atoi (color); if (i >= 8 && i <= 15) - { /* bright colors */ - i -= 8; - pix_colors_focused[idx] = pix_colors_focused[minBrightCOLOR + i]; + { + /* bright colors */ + pix_colors_focused[idx] = pix_colors_focused[minBrightCOLOR + i - 8]; goto done; } if (i >= 0 && i <= 7) - { /* normal colors */ + { + /* normal colors */ pix_colors_focused[idx] = pix_colors_focused[minCOLOR + i]; goto done; } @@ -1003,8 +1005,6 @@ pix_colors_focused[idx] = xcol; - /* XSetWindowAttributes attr; */ - /* Cursor cursor; */ done: /*TODO: handle Color_BD, scrollbar background, etc. */ @@ -1038,7 +1038,7 @@ rxvt_term::set_colorfgbg () { unsigned int i; - const char *xpmb = "\0"; + const char *xpmb = ""; char fstr[sizeof ("default") + 1], bstr[sizeof ("default") + 1]; strcpy (fstr, "default"); @@ -1748,12 +1748,13 @@ #ifdef HAVE_BG_PIXMAP # if TRACE_PIXMAPS # undef update_background -int rxvt_term::trace_update_background (const char* file, int line) +int rxvt_term::trace_update_background (const char *file, int line) { fprintf (stderr, "%s:%d:update_background()\n", file, line); update_background (); } # endif + int rxvt_term::update_background () {