ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/background.C
(Generate patch)

Comparing rxvt-unicode/src/background.C (file contents):
Revision 1.248 by sf-exg, Sun Dec 30 11:34:43 2012 UTC vs.
Revision 1.253 by sf-exg, Sun Dec 30 15:52:37 2012 UTC

315 img->repeat_mode (RepeatNormal); 315 img->repeat_mode (RepeatNormal);
316 else 316 else
317 img->repeat_mode (RepeatNone); 317 img->repeat_mode (RepeatNone);
318 img->sub_rect (-x, -y, parent_width, parent_height)->replace (img); 318 img->sub_rect (-x, -y, parent_width, parent_height)->replace (img);
319 319
320 if (bg_flags & BG_IS_VALID) 320 if (bg_img)
321 img->draw (bg_img, PictOpOver, image.alpha * 1. / 0xffff); 321 img->draw (bg_img, PictOpOver, image.alpha * 1. / 0xffff);
322 322
323 XRenderPictFormat *format = XRenderFindVisualFormat (dpy, visual); 323 XRenderPictFormat *format = XRenderFindVisualFormat (dpy, visual);
324 img->convert_format (format, pix_colors [Color_bg])->replace (img); 324 img->convert_format (format, pix_colors [Color_bg])->replace (img);
325 325
498rxvt_term::bg_render () 498rxvt_term::bg_render ()
499{ 499{
500 if (bg_flags & BG_INHIBIT_RENDER) 500 if (bg_flags & BG_INHIBIT_RENDER)
501 return; 501 return;
502 502
503 bg_invalidate (); 503 delete bg_img;
504 bg_img = 0;
505 bg_flags = 0;
506
507 if (!mapped)
508 return;
509
504# if BG_IMAGE_FROM_ROOT 510# if BG_IMAGE_FROM_ROOT
505 if (option (Opt_transparent)) 511 if (option (Opt_transparent))
506 {
507 /* we need to re-generate transparency pixmap in that case ! */
508 if (render_root_image ()) 512 if (render_root_image ())
509 bg_flags |= BG_IS_VALID | BG_IS_TRANSPARENT; 513 bg_flags |= BG_IS_TRANSPARENT;
510 }
511# endif 514# endif
512 515
513# if BG_IMAGE_FROM_FILE 516# if BG_IMAGE_FROM_FILE
514 if (fimage.img) 517 if (fimage.img)
515 {
516 if (render_image (fimage)) 518 render_image (fimage);
517 bg_flags |= BG_IS_VALID;
518 }
519# endif 519# endif
520
521 if (!(bg_flags & BG_IS_VALID))
522 {
523 delete bg_img;
524 bg_img = 0;
525 }
526 520
527 scr_recolour (false); 521 scr_recolour (false);
528 bg_flags |= BG_NEEDS_REFRESH; 522 bg_flags |= BG_NEEDS_REFRESH;
529 523
530 bg_valid_since = ev::now (); 524 bg_valid_since = ev::now ();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines