--- rxvt-unicode/src/main.C 2007/08/10 22:10:36 1.240 +++ rxvt-unicode/src/main.C 2007/08/16 21:26:20 1.243 @@ -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,13 @@ else bgPixmap.set_defaultGeometry (); - changed = bgPixmap.set_file (rs[Rs_backgroundPixmap]); + bgPixmap.set_file (rs[Rs_backgroundPixmap]); } + /* do not want to render Pixmap yet if we are size/position dependant - + * wait for ConfigureNotify at least */ + if (!bgPixmap.window_size_sensitive ()) + update_background(); #endif - if (changed) - { - bgPixmap.render_background (); - scr_touch (true); - } } #endif @@ -1151,11 +1148,13 @@ window_vt_x, window_vt_y, width, height); - scr_clear (); #ifdef XPM_BACKGROUND - /* TODO: should that really be here ? */ - bgPixmap.render_background (); + /* TODO: replace with update_pixmap() that should unify transparency and bg image handling ! */ + if (bgPixmap.window_size_sensitive ()) + update_background (); #endif + + scr_clear (); } if (fix_screen || old_height == 0) @@ -1165,8 +1164,9 @@ //scr_touch (false); #ifdef HAVE_BG_PIXMAP - if (bgPixmap.pixmap) - scr_touch (false); +// TODO: this don't seem to have any effect - do we still need it ? If so - in which case exactly ? +// if (bgPixmap.pixmap) +// scr_touch (false); #endif #ifdef USE_XIM