… | |
… | |
226 | if (fontset[i] != fontset[0]) |
226 | if (fontset[i] != fontset[0]) |
227 | delete fontset[i]; |
227 | delete fontset[i]; |
228 | #endif |
228 | #endif |
229 | delete fontset[0]; |
229 | delete fontset[0]; |
230 | |
230 | |
|
|
231 | #ifdef HAVE_BG_PIXMAP |
|
|
232 | bgPixmap.destroy (); |
|
|
233 | #endif |
|
|
234 | |
231 | if (display) |
235 | if (display) |
232 | { |
236 | { |
233 | selection_clear (); |
237 | selection_clear (); |
234 | |
238 | |
235 | #ifdef USE_XIM |
239 | #ifdef USE_XIM |
… | |
… | |
274 | pix_colors_unfocused [i].free (this); |
278 | pix_colors_unfocused [i].free (this); |
275 | #endif |
279 | #endif |
276 | } |
280 | } |
277 | |
281 | |
278 | clear (); |
282 | clear (); |
279 | } |
|
|
280 | |
283 | |
281 | #ifdef HAVE_BG_PIXMAP |
|
|
282 | bgPixmap.destroy (); |
|
|
283 | #endif |
|
|
284 | display->flush (); /* ideally .put should do this */ |
284 | display->flush (); /* ideally .put should do this */ |
285 | displays.put (display); |
285 | displays.put (display); |
|
|
286 | } |
286 | |
287 | |
287 | scr_release (); |
288 | scr_release (); |
288 | |
289 | |
289 | /* clear all resources */ |
290 | /* clear all resources */ |
290 | for (int i = 0; i < allocated.size (); i++) |
291 | for (int i = 0; i < allocated.size (); i++) |
… | |
… | |
511 | resize_scrollbar (); /* create and map scrollbar */ |
512 | resize_scrollbar (); /* create and map scrollbar */ |
512 | #endif |
513 | #endif |
513 | #ifdef HAVE_BG_PIXMAP |
514 | #ifdef HAVE_BG_PIXMAP |
514 | { |
515 | { |
515 | bgPixmap.set_target (this); |
516 | bgPixmap.set_target (this); |
|
|
517 | bgPixmap.invalidate (); |
516 | |
518 | |
517 | #ifdef ENABLE_TRANSPARENCY |
519 | #ifdef ENABLE_TRANSPARENCY |
518 | if (option (Opt_transparent)) |
520 | if (option (Opt_transparent)) |
519 | { |
521 | { |
520 | bgPixmap.set_transparent (); |
522 | bgPixmap.set_transparent (); |
… | |
… | |
581 | } |
583 | } |
582 | #endif |
584 | #endif |
583 | |
585 | |
584 | XMapWindow (dpy, vt); |
586 | XMapWindow (dpy, vt); |
585 | XMapWindow (dpy, parent[0]); |
587 | XMapWindow (dpy, parent[0]); |
|
|
588 | |
|
|
589 | refresh_check (); |
586 | } |
590 | } |
587 | |
591 | |
588 | static struct sig_handlers |
592 | static struct sig_handlers |
589 | { |
593 | { |
590 | ev::sig sw_term, sw_int; |
594 | ev::sig sw_term, sw_int; |
… | |
… | |
1716 | if (update_background_ev.is_active ()) |
1720 | if (update_background_ev.is_active ()) |
1717 | return; |
1721 | return; |
1718 | |
1722 | |
1719 | bgPixmap.invalidate (); |
1723 | bgPixmap.invalidate (); |
1720 | |
1724 | |
1721 | ev_tstamp refresh; |
1725 | ev_tstamp to_wait = 0.5 - (ev::now () - bgPixmap.valid_since); |
1722 | |
1726 | |
1723 | if (!bgPixmap.need_client_side_rendering ()) |
1727 | if (to_wait <= 0.) |
1724 | refresh = .05; |
1728 | 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 |
1729 | else |
1729 | refresh = .07; |
|
|
1730 | |
|
|
1731 | update_background_ev.start (refresh); |
1730 | update_background_ev.start (to_wait); |
1732 | } |
1731 | } |
1733 | |
1732 | |
1734 | void |
1733 | void |
1735 | rxvt_term::update_background_cb (ev::timer &w, int revents) |
1734 | rxvt_term::update_background_cb (ev::timer &w, int revents) |
1736 | { |
1735 | { |