ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/main.C
(Generate patch)

Comparing rxvt-unicode/src/main.C (file contents):
Revision 1.400 by sf-exg, Tue Jun 28 21:56:17 2016 UTC vs.
Revision 1.401 by sf-exg, Thu Jul 14 05:33:26 2016 UTC

151} 151}
152#endif 152#endif
153 153
154rxvt_term::rxvt_term () 154rxvt_term::rxvt_term ()
155{ 155{
156#if HAVE_BG_PIXMAP
157 update_background_ev.set<rxvt_term, &rxvt_term::update_background_cb> (this);
158#endif
159#ifdef CURSOR_BLINK 156#ifdef CURSOR_BLINK
160 cursor_blink_ev.set <rxvt_term, &rxvt_term::cursor_blink_cb> (this); cursor_blink_ev.set (0., CURSOR_BLINK_INTERVAL); 157 cursor_blink_ev.set <rxvt_term, &rxvt_term::cursor_blink_cb> (this); cursor_blink_ev.set (0., CURSOR_BLINK_INTERVAL);
161#endif 158#endif
162#ifdef TEXT_BLINK 159#ifdef TEXT_BLINK
163 text_blink_ev.set <rxvt_term, &rxvt_term::text_blink_cb> (this); text_blink_ev.set (0., TEXT_BLINK_INTERVAL); 160 text_blink_ev.set <rxvt_term, &rxvt_term::text_blink_cb> (this); text_blink_ev.set (0., TEXT_BLINK_INTERVAL);
169 sel_scroll_ev.set <rxvt_term, &rxvt_term::sel_scroll_cb> (this); 166 sel_scroll_ev.set <rxvt_term, &rxvt_term::sel_scroll_cb> (this);
170#endif 167#endif
171#if defined(MOUSE_WHEEL) && defined(MOUSE_SLIP_WHEELING) 168#if defined(MOUSE_WHEEL) && defined(MOUSE_SLIP_WHEELING)
172 slip_wheel_ev.set <rxvt_term, &rxvt_term::slip_wheel_cb> (this); 169 slip_wheel_ev.set <rxvt_term, &rxvt_term::slip_wheel_cb> (this);
173#endif 170#endif
174#if BG_IMAGE_FROM_ROOT || ENABLE_PERL 171#if ENABLE_PERL
175 rootwin_ev.set <rxvt_term, &rxvt_term::rootwin_cb> (this), 172 rootwin_ev.set <rxvt_term, &rxvt_term::rootwin_cb> (this),
176#endif 173#endif
177 scrollbar_ev.set <rxvt_term, &rxvt_term::x_cb> (this), 174 scrollbar_ev.set <rxvt_term, &rxvt_term::x_cb> (this),
178#if USE_XIM 175#if USE_XIM
179 im_ev.set <rxvt_term, &rxvt_term::im_cb> (this), 176 im_ev.set <rxvt_term, &rxvt_term::im_cb> (this),
222 for (int i = RS_styleCount; --i; ) 219 for (int i = RS_styleCount; --i; )
223 if (fontset[i] != fontset[0]) 220 if (fontset[i] != fontset[0])
224 delete fontset[i]; 221 delete fontset[i];
225#endif 222#endif
226 delete fontset[0]; 223 delete fontset[0];
227
228#ifdef HAVE_BG_PIXMAP
229 bg_destroy ();
230#endif
231 224
232#if HAVE_IMG 225#if HAVE_IMG
233 delete bg_img; 226 delete bg_img;
234#endif 227#endif
235 228
327 { 320 {
328#if USE_XIM 321#if USE_XIM
329 im_ev.stop (display); 322 im_ev.stop (display);
330#endif 323#endif
331 scrollbar_ev.stop (display); 324 scrollbar_ev.stop (display);
332#if BG_IMAGE_FROM_ROOT || ENABLE_PERL 325#if ENABLE_PERL
333 rootwin_ev.stop (display); 326 rootwin_ev.stop (display);
334#endif 327#endif
335 termwin_ev.stop (display); 328 termwin_ev.stop (display);
336 vt_ev.stop (display); 329 vt_ev.stop (display);
337 } 330 }
1022 1015
1023 for (i = Color_Black; i <= Color_White; i++) 1016 for (i = Color_Black; i <= Color_White; i++)
1024 if (pix_colors[Color_bg] == pix_colors[i]) 1017 if (pix_colors[Color_bg] == pix_colors[i])
1025 { 1018 {
1026 sprintf (bstr, "%d", i - Color_Black); 1019 sprintf (bstr, "%d", i - Color_Black);
1027#if BG_IMAGE_FROM_FILE 1020#if HAVE_IMG
1028 xpmb = "default;"; 1021 xpmb = "default;";
1029#endif 1022#endif
1030 break; 1023 break;
1031 } 1024 }
1032 1025
1158 XMoveResizeWindow (dpy, vt, 1151 XMoveResizeWindow (dpy, vt,
1159 window_vt_x, window_vt_y, 1152 window_vt_x, window_vt_y,
1160 vt_width, vt_height); 1153 vt_width, vt_height);
1161 1154
1162 HOOK_INVOKE ((this, HOOK_SIZE_CHANGE, DT_INT, newwidth, DT_INT, newheight, DT_END)); 1155 HOOK_INVOKE ((this, HOOK_SIZE_CHANGE, DT_INT, newwidth, DT_INT, newheight, DT_END));
1163
1164#ifdef HAVE_BG_PIXMAP
1165 if (bg_window_size_sensitive ())
1166 update_background ();
1167#endif
1168 } 1156 }
1169 1157
1170 if (fix_screen || old_height == 0) 1158 if (fix_screen || old_height == 0)
1171 scr_reset (); 1159 scr_reset ();
1172 1160
1705{ 1693{
1706 Window cr; 1694 Window cr;
1707 XTranslateCoordinates (dpy, parent, display->root, 0, 0, &x, &y, &cr); 1695 XTranslateCoordinates (dpy, parent, display->root, 0, 0, &x, &y, &cr);
1708} 1696}
1709 1697
1710#ifdef HAVE_BG_PIXMAP
1711
1712void
1713rxvt_term::update_background ()
1714{
1715 if (update_background_ev.is_active ())
1716 return;
1717
1718 ev_tstamp to_wait = 0.5 - (ev::now () - bg_valid_since);
1719
1720 if (to_wait <= 0.)
1721 bg_render ();
1722 else
1723 update_background_ev.start (to_wait);
1724}
1725
1726void
1727rxvt_term::update_background_cb (ev::timer &w, int revents)
1728{
1729 make_current ();
1730
1731 update_background_ev.stop ();
1732 bg_render ();
1733 refresh_check ();
1734}
1735
1736#endif /* HAVE_BG_PIXMAP */
1737
1738/*----------------------- end-of-file (C source) -----------------------*/ 1698/*----------------------- end-of-file (C source) -----------------------*/

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines