--- rxvt-unicode/src/main.C 2007/12/24 06:51:37 1.291 +++ rxvt-unicode/src/main.C 2008/01/15 23:21:18 1.299 @@ -278,11 +278,6 @@ clear (); } - delete [] pix_colors_focused; -#if OFF_FOCUS_FADING - delete [] pix_colors_unfocused; -#endif - #ifdef HAVE_BG_PIXMAP bgPixmap.destroy (); #endif @@ -518,6 +513,7 @@ #ifdef HAVE_BG_PIXMAP { bgPixmap.set_target (this); + bgPixmap.invalidate (); #ifdef ENABLE_TRANSPARENCY if (option (Opt_transparent)) @@ -588,6 +584,8 @@ XMapWindow (dpy, vt); XMapWindow (dpy, parent[0]); + + refresh_check (); } static struct sig_handlers @@ -1698,10 +1696,9 @@ 0L, 1L, False, XA_PIXMAP, &atype, &aformat, &nitems, &bytes_after, &prop); if (result == Success && prop && atype == XA_PIXMAP) - { - return *(Pixmap *)prop; - } + return *(Pixmap *)prop; } + return None; } @@ -1719,34 +1716,25 @@ void rxvt_term::update_background () { - bgPixmap.invalidate (); + if (update_background_ev.is_active ()) + return; - /* no chance of real time refresh if we are blurring! */ - if (bgPixmap.invalid_since + 0.50 < ev::now () - && !(bgPixmap.flags & bgPixmap_t::blurNeeded)) - { - update_background_ev.stop (); - bgPixmap.render (); - } - else - { - ev_tstamp refresh; + bgPixmap.invalidate (); - if (!bgPixmap.need_client_side_rendering ()) - refresh = .05; - else if (bgPixmap.flags & bgPixmap_t::blurNeeded) - refresh = .20; /* very slow !!! */ - else - refresh = .07; + ev_tstamp to_wait = 0.5 - (ev::now () - bgPixmap.valid_since); - update_background_ev.start (refresh); - } + if (to_wait <= 0.) + bgPixmap.render (); + else + update_background_ev.start (to_wait); } void rxvt_term::update_background_cb (ev::timer &w, int revents) { make_current (); + + update_background_ev.stop (); bgPixmap.render (); refresh_check (); }