… | |
… | |
3451 | #if BG_IMAGE_FROM_FILE |
3451 | #if BG_IMAGE_FROM_FILE |
3452 | case Rxvt_Pixmap: |
3452 | case Rxvt_Pixmap: |
3453 | if (!strcmp (str, "?")) |
3453 | if (!strcmp (str, "?")) |
3454 | { |
3454 | { |
3455 | char str[256]; |
3455 | char str[256]; |
|
|
3456 | int h_scale = 0, v_scale = 0; |
|
|
3457 | int h_align = 0, v_align = 0; |
|
|
3458 | if (image_vec.size () > 0) |
|
|
3459 | { |
|
|
3460 | h_scale = image_vec[0].h_scale; |
|
|
3461 | v_scale = image_vec[0].v_scale; |
|
|
3462 | h_align = image_vec[0].h_align; |
|
|
3463 | v_align = image_vec[0].v_align; |
|
|
3464 | } |
3456 | |
3465 | |
3457 | sprintf (str, "[%dx%d+%d+%d]", |
3466 | sprintf (str, "[%dx%d+%d+%d]", |
3458 | min (bg_image.h_scale, 32767), min (bg_image.v_scale, 32767), |
3467 | h_scale, v_scale, |
3459 | min (bg_image.h_align, 32767), min (bg_image.v_align, 32767)); |
3468 | h_align, v_align); |
3460 | process_xterm_seq (XTerm_title, str, CHAR_ST); |
3469 | process_xterm_seq (XTerm_title, str, CHAR_ST); |
3461 | } |
3470 | } |
3462 | else |
3471 | else |
3463 | { |
3472 | { |
3464 | bool changed = false; |
3473 | bool changed = false; |
3465 | |
3474 | |
3466 | if (*str != ';') |
3475 | if (*str != ';') |
3467 | { |
3476 | { |
3468 | if (bg_image.set_file (str)) /* change pixmap */ |
3477 | if (image_vec.size () > 0 |
|
|
3478 | && image_vec[0].set_file_geometry (str)) |
3469 | changed = true; |
3479 | changed = true; |
|
|
3480 | else |
|
|
3481 | { |
|
|
3482 | rxvt_image *image = new_image (); |
|
|
3483 | if (!image->set_file_geometry (str)) |
|
|
3484 | image_vec.pop_back (); |
|
|
3485 | else |
|
|
3486 | changed = true; |
|
|
3487 | } |
3470 | } |
3488 | } |
3471 | else |
3489 | else |
3472 | { |
3490 | { |
3473 | str++; |
3491 | str++; |
|
|
3492 | if (image_vec.size () > 0 |
3474 | if (bg_image.set_geometry (str, true)) |
3493 | && image_vec[0].set_geometry (str, true)) |
3475 | changed = true; |
3494 | changed = true; |
3476 | } |
3495 | } |
3477 | |
3496 | |
3478 | if (changed) |
3497 | if (changed) |
3479 | { |
3498 | { |