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.249 by sf-exg, Sun Dec 30 11:52:15 2012 UTC vs.
Revision 1.250 by sf-exg, Sun Dec 30 12:06:33 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 delete bg_img;
504 bg_img = 0;
503 bg_flags &= BG_INHIBIT_RENDER; 505 bg_flags &= BG_INHIBIT_RENDER;
504 506
505# if BG_IMAGE_FROM_ROOT 507# if BG_IMAGE_FROM_ROOT
506 if (option (Opt_transparent)) 508 if (option (Opt_transparent))
507 { 509 {
516 { 518 {
517 if (render_image (fimage)) 519 if (render_image (fimage))
518 bg_flags |= BG_IS_VALID; 520 bg_flags |= BG_IS_VALID;
519 } 521 }
520# endif 522# endif
521
522 if (!(bg_flags & BG_IS_VALID))
523 {
524 delete bg_img;
525 bg_img = 0;
526 }
527 523
528 scr_recolour (false); 524 scr_recolour (false);
529 bg_flags |= BG_NEEDS_REFRESH; 525 bg_flags |= BG_NEEDS_REFRESH;
530 526
531 bg_valid_since = ev::now (); 527 bg_valid_since = ev::now ();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines