… | |
… | |
511 | resize_scrollbar (); /* create and map scrollbar */ |
511 | resize_scrollbar (); /* create and map scrollbar */ |
512 | #endif |
512 | #endif |
513 | #ifdef HAVE_BG_PIXMAP |
513 | #ifdef HAVE_BG_PIXMAP |
514 | { |
514 | { |
515 | bgPixmap.set_target (this); |
515 | bgPixmap.set_target (this); |
|
|
516 | bgPixmap.invalidate (); |
516 | |
517 | |
517 | #ifdef ENABLE_TRANSPARENCY |
518 | #ifdef ENABLE_TRANSPARENCY |
518 | if (option (Opt_transparent)) |
519 | if (option (Opt_transparent)) |
519 | { |
520 | { |
520 | bgPixmap.set_transparent (); |
521 | bgPixmap.set_transparent (); |
… | |
… | |
581 | } |
582 | } |
582 | #endif |
583 | #endif |
583 | |
584 | |
584 | XMapWindow (dpy, vt); |
585 | XMapWindow (dpy, vt); |
585 | XMapWindow (dpy, parent[0]); |
586 | XMapWindow (dpy, parent[0]); |
|
|
587 | |
|
|
588 | refresh_check (); |
586 | } |
589 | } |
587 | |
590 | |
588 | static struct sig_handlers |
591 | static struct sig_handlers |
589 | { |
592 | { |
590 | ev::sig sw_term, sw_int; |
593 | ev::sig sw_term, sw_int; |
… | |
… | |
1716 | if (update_background_ev.is_active ()) |
1719 | if (update_background_ev.is_active ()) |
1717 | return; |
1720 | return; |
1718 | |
1721 | |
1719 | bgPixmap.invalidate (); |
1722 | bgPixmap.invalidate (); |
1720 | |
1723 | |
1721 | ev_tstamp refresh; |
1724 | ev_tstamp to_wait = 0.5 - (ev::now () - bgPixmap.valid_since); |
1722 | |
1725 | |
1723 | if (!bgPixmap.need_client_side_rendering ()) |
1726 | if (to_wait <= 0.) |
1724 | refresh = .05; |
1727 | bgPixmap.render (); |
1725 | else if (bgPixmap.flags & bgPixmap_t::blurNeeded) |
|
|
1726 | /* no chance of real time refresh if we are blurring! */ |
|
|
1727 | refresh = .50; |
|
|
1728 | else |
1728 | else |
1729 | refresh = .07; |
|
|
1730 | |
|
|
1731 | update_background_ev.start (refresh); |
1729 | update_background_ev.start (to_wait); |
1732 | } |
1730 | } |
1733 | |
1731 | |
1734 | void |
1732 | void |
1735 | rxvt_term::update_background_cb (ev::timer &w, int revents) |
1733 | rxvt_term::update_background_cb (ev::timer &w, int revents) |
1736 | { |
1734 | { |