--- rxvt-unicode/src/main.C 2007/12/18 12:52:30 1.290 +++ rxvt-unicode/src/main.C 2007/12/24 06:51:37 1.291 @@ -172,7 +172,7 @@ slip_wheel_ev.set (this); #endif #if ENABLE_TRANSPARENCY || ENABLE_PERL - rootwin_ev.set (this), + rootwin_ev.set (this), #endif #ifdef HAVE_SCROLLBARS scrollbar_ev.set (this), @@ -523,12 +523,14 @@ if (option (Opt_transparent)) { bgPixmap.set_transparent (); + #ifdef HAVE_AFTERIMAGE if (rs [Rs_blurradius]) bgPixmap.set_blur_radius (rs [Rs_blurradius]); #endif if (ISSET_PIXCOLOR (Color_tint)) bgPixmap.set_tint (pix_colors_focused [Color_tint]); + if (rs [Rs_shade]) bgPixmap.set_shade (rs [Rs_shade]); @@ -539,11 +541,11 @@ #endif #ifdef BG_IMAGE_FROM_FILE - if (rs[Rs_backgroundPixmap] != NULL) + if (rs[Rs_backgroundPixmap]) { const char *p = rs[Rs_backgroundPixmap]; - if ((p = strchr (p, ';')) != NULL) + if ((p = strchr (p, ';')) != 0) { p++; bgPixmap.set_geometry (p); @@ -1706,25 +1708,29 @@ #ifdef HAVE_BG_PIXMAP # if TRACE_PIXMAPS # undef update_background -int rxvt_term::trace_update_background (const char *file, int line) +void +rxvt_term::trace_update_background (const char *file, int line) { fprintf (stderr, "%s:%d:update_background()\n", file, line); update_background (); } # endif -int +void rxvt_term::update_background () { bgPixmap.invalidate (); /* no chance of real time refresh if we are blurring! */ - if (bgPixmap.invalid_since + 0.5 < ev::now () && !(bgPixmap.flags & bgPixmap_t::blurNeeded)) - bgPixmap.render (); + if (bgPixmap.invalid_since + 0.50 < ev::now () + && !(bgPixmap.flags & bgPixmap_t::blurNeeded)) + { + update_background_ev.stop (); + bgPixmap.render (); + } else { ev_tstamp refresh; - update_background_ev.stop (); if (!bgPixmap.need_client_side_rendering ()) refresh = .05; @@ -1732,10 +1738,9 @@ refresh = .20; /* very slow !!! */ else refresh = .07; + update_background_ev.start (refresh); } - - return 0; } void