… | |
… | |
42 | |
42 | |
43 | bool |
43 | bool |
44 | rxvt_term::bg_window_size_sensitive () |
44 | rxvt_term::bg_window_size_sensitive () |
45 | { |
45 | { |
46 | # if BG_IMAGE_FROM_ROOT |
46 | # if BG_IMAGE_FROM_ROOT |
47 | if (option (Opt_transparent)) |
47 | if (root_img) |
48 | return true; |
48 | return true; |
49 | # endif |
49 | # endif |
50 | |
50 | |
51 | # if BG_IMAGE_FROM_FILE |
51 | # if BG_IMAGE_FROM_FILE |
52 | if (fimage.img) |
52 | if (fimage.img) |
… | |
… | |
63 | |
63 | |
64 | bool |
64 | bool |
65 | rxvt_term::bg_window_position_sensitive () |
65 | rxvt_term::bg_window_position_sensitive () |
66 | { |
66 | { |
67 | # if BG_IMAGE_FROM_ROOT |
67 | # if BG_IMAGE_FROM_ROOT |
68 | if (option (Opt_transparent)) |
68 | if (root_img) |
69 | return true; |
69 | return true; |
70 | # endif |
70 | # endif |
71 | |
71 | |
72 | # if BG_IMAGE_FROM_FILE |
72 | # if BG_IMAGE_FROM_FILE |
73 | if (fimage.img) |
73 | if (fimage.img) |
… | |
… | |
456 | int sx, sy; |
456 | int sx, sy; |
457 | |
457 | |
458 | sx = parent_x; |
458 | sx = parent_x; |
459 | sy = parent_y; |
459 | sy = parent_y; |
460 | |
460 | |
461 | if (!root_img) |
|
|
462 | return false; |
|
|
463 | |
|
|
464 | /* check if we are outside of the visible part of the virtual screen : */ |
461 | /* check if we are outside of the visible part of the virtual screen : */ |
465 | if (sx + parent_width <= 0 || sy + parent_height <= 0 |
462 | if (sx + parent_width <= 0 || sy + parent_height <= 0 |
466 | || sx >= root_width || sy >= root_height) |
463 | || sx >= root_width || sy >= root_height) |
467 | return 0; |
464 | return 0; |
468 | |
465 | |
… | |
… | |
500 | if (bg_flags & BG_INHIBIT_RENDER) |
497 | if (bg_flags & BG_INHIBIT_RENDER) |
501 | return; |
498 | return; |
502 | |
499 | |
503 | delete bg_img; |
500 | delete bg_img; |
504 | bg_img = 0; |
501 | bg_img = 0; |
505 | bg_flags &= BG_INHIBIT_RENDER; |
502 | bg_flags = 0; |
|
|
503 | |
|
|
504 | if (!mapped) |
|
|
505 | return; |
506 | |
506 | |
507 | # if BG_IMAGE_FROM_ROOT |
507 | # if BG_IMAGE_FROM_ROOT |
508 | if (option (Opt_transparent)) |
508 | if (root_img) |
509 | { |
|
|
510 | /* we need to re-generate transparency pixmap in that case ! */ |
|
|
511 | if (render_root_image ()) |
509 | if (render_root_image ()) |
512 | bg_flags |= BG_IS_VALID | BG_IS_TRANSPARENT; |
510 | bg_flags |= BG_IS_TRANSPARENT; |
513 | } |
|
|
514 | # endif |
511 | # endif |
515 | |
512 | |
516 | # if BG_IMAGE_FROM_FILE |
513 | # if BG_IMAGE_FROM_FILE |
517 | if (fimage.img) |
514 | if (fimage.img) |
518 | { |
|
|
519 | if (render_image (fimage)) |
515 | render_image (fimage); |
520 | bg_flags |= BG_IS_VALID; |
|
|
521 | } |
|
|
522 | # endif |
516 | # endif |
523 | |
517 | |
524 | scr_recolour (false); |
518 | scr_recolour (false); |
525 | bg_flags |= BG_NEEDS_REFRESH; |
519 | bg_flags |= BG_NEEDS_REFRESH; |
526 | |
520 | |