--- rxvt-unicode/src/main.C 2007/08/15 22:41:52 1.242 +++ rxvt-unicode/src/main.C 2007/09/12 19:51:41 1.248 @@ -153,8 +153,8 @@ #if ENABLE_TRANSPARENCY || ENABLE_PERL rootwin_ev (this, &rxvt_term::rootwin_cb), #endif -#if ENABLE_TRANSPARENCY - check_our_parents_ev(this, &rxvt_term::check_our_parents_cb), +#if HAVE_BG_PIXMAP + update_background_ev(this, &rxvt_term::update_background_cb), #endif #ifdef HAVE_SCROLLBARS scrollbar_ev (this, &rxvt_term::x_cb), @@ -508,7 +508,6 @@ #endif #ifdef HAVE_BG_PIXMAP { - bool changed = false; bgPixmap.set_target (this); #ifdef ENABLE_TRANSPARENCY @@ -523,7 +522,6 @@ bgPixmap.set_tint (pix_colors_focused [Color_tint]); if (rs [Rs_shade]) bgPixmap.set_shade (rs [Rs_shade]); - changed = true; bgPixmap.set_root_pixmap (); XSelectInput (dpy, display->root, PropertyChangeMask); @@ -544,14 +542,11 @@ else bgPixmap.set_defaultGeometry (); - changed = bgPixmap.set_file (rs[Rs_backgroundPixmap]); + if (bgPixmap.set_file (rs[Rs_backgroundPixmap])) + if (!bgPixmap.window_position_sensitive ()) + update_background (); } #endif - if (changed) - { - bgPixmap.render (); - scr_touch (true); - } } #endif @@ -1151,10 +1146,9 @@ window_vt_x, window_vt_y, width, height); -#ifdef XPM_BACKGROUND - /* TODO: replace with update_pixmap() that should unify transparency and bg image handling ! */ +#ifdef HAVE_BG_PIXMAP if (bgPixmap.window_size_sensitive ()) - bgPixmap.render (); + update_background (); #endif scr_clear ();