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

Comparing rxvt-unicode/src/command.C (file contents):
Revision 1.329 by ayin, Mon Jun 11 19:57:28 2007 UTC vs.
Revision 1.333 by ayin, Tue Jun 26 09:55:22 2007 UTC

1035void 1035void
1036rxvt_term::flush () 1036rxvt_term::flush ()
1037{ 1037{
1038 flush_ev.stop (); 1038 flush_ev.stop ();
1039 1039
1040#ifdef TRANSPARENT 1040#ifdef ENABLE_TRANSPARENCY
1041 if (want_full_refresh) 1041 if (want_full_refresh)
1042 { 1042 {
1043 want_full_refresh = 0; 1043 want_full_refresh = 0;
1044 scr_clear (); 1044 scr_clear ();
1045 scr_touch (false); 1045 scr_touch (false);
1110void 1110void
1111rxvt_term::flush_cb (time_watcher &w) 1111rxvt_term::flush_cb (time_watcher &w)
1112{ 1112{
1113 make_current (); 1113 make_current ();
1114 1114
1115 refresh_limit = 1;
1116 refresh_count = 0; 1115 refresh_count = 0;
1117 flush (); 1116 flush ();
1118} 1117}
1119 1118
1120#ifdef CURSOR_BLINK 1119#ifdef CURSOR_BLINK
1500#endif 1499#endif
1501 } 1500 }
1502 1501
1503 HOOK_INVOKE ((this, HOOK_CONFIGURE_NOTIFY, DT_XEVENT, &ev, DT_END)); 1502 HOOK_INVOKE ((this, HOOK_CONFIGURE_NOTIFY, DT_XEVENT, &ev, DT_END));
1504 1503
1505#ifdef TRANSPARENT 1504#ifdef ENABLE_TRANSPARENCY
1506 if (option (Opt_transparent)) 1505 if (option (Opt_transparent))
1507 check_our_parents (); 1506 check_our_parents ();
1508#endif 1507#endif
1509 } 1508 }
1510 break; 1509 break;
1544 text_blink_ev.stop (); 1543 text_blink_ev.stop ();
1545#endif 1544#endif
1546 HOOK_INVOKE ((this, HOOK_UNMAP_NOTIFY, DT_XEVENT, &ev, DT_END)); 1545 HOOK_INVOKE ((this, HOOK_UNMAP_NOTIFY, DT_XEVENT, &ev, DT_END));
1547 break; 1546 break;
1548 1547
1549#ifdef TRANSPARENT 1548#ifdef ENABLE_TRANSPARENCY
1550 case ReparentNotify: 1549 case ReparentNotify:
1551 rootwin_cb (ev); 1550 rootwin_cb (ev);
1552 break; 1551 break;
1553#endif /* TRANSPARENT */ 1552#endif /* ENABLE_TRANSPARENCY */
1554 1553
1555 case GraphicsExpose: 1554 case GraphicsExpose:
1556 case Expose: 1555 case Expose:
1557 if (ev.xany.window == vt) 1556 if (ev.xany.window == vt)
1558 { 1557 {
1582 { 1581 {
1583 scrollBar.setIdle (); 1582 scrollBar.setIdle ();
1584 scrollbar_show (0); 1583 scrollbar_show (0);
1585 } 1584 }
1586 1585
1587#ifdef TRANSPARENT 1586#ifdef ENABLE_TRANSPARENCY
1588 if (am_transparent && ev.xany.window == parent[0]) 1587 if (am_transparent && ev.xany.window == parent[0])
1589 XClearWindow (dpy, ev.xany.window); 1588 XClearWindow (dpy, ev.xany.window);
1590#endif 1589#endif
1591 } 1590 }
1592 break; 1591 break;
1693 &ev.xbutton.x, &ev.xbutton.y, 1692 &ev.xbutton.x, &ev.xbutton.y,
1694 &unused_mask); 1693 &unused_mask);
1695 scr_move_to (scrollbar_position (ev.xbutton.y) - csrO, 1694 scr_move_to (scrollbar_position (ev.xbutton.y) - csrO,
1696 scrollbar_size ()); 1695 scrollbar_size ());
1697 want_refresh = 1; 1696 want_refresh = 1;
1698 refresh_limit = 0;
1699 scrollbar_show (1); 1697 scrollbar_show (1);
1700 } 1698 }
1701 break; 1699 break;
1702 } 1700 }
1703 1701
1822 pix_colors_focused [idx].fade (this, atoi (rs[Rs_fade]), pix_colors_unfocused [idx], c); 1820 pix_colors_focused [idx].fade (this, atoi (rs[Rs_fade]), pix_colors_unfocused [idx], c);
1823 } 1821 }
1824#endif 1822#endif
1825} 1823}
1826 1824
1827#if TRANSPARENT || ENABLE_PERL 1825#if ENABLE_TRANSPARENCY || ENABLE_PERL
1828void 1826void
1829rxvt_term::rootwin_cb (XEvent &ev) 1827rxvt_term::rootwin_cb (XEvent &ev)
1830{ 1828{
1831 make_current (); 1829 make_current ();
1832 1830
1833 if (SHOULD_INVOKE (HOOK_ROOT_EVENT) 1831 if (SHOULD_INVOKE (HOOK_ROOT_EVENT)
1834 && HOOK_INVOKE ((this, HOOK_ROOT_EVENT, DT_XEVENT, &ev, DT_END))) 1832 && HOOK_INVOKE ((this, HOOK_ROOT_EVENT, DT_XEVENT, &ev, DT_END)))
1835 return; 1833 return;
1836 1834
1837# if TRANSPARENT 1835# if ENABLE_TRANSPARENCY
1838 switch (ev.type) 1836 switch (ev.type)
1839 { 1837 {
1840 case PropertyNotify: 1838 case PropertyNotify:
1841 /* 1839 /*
1842 * if user used some Esetroot compatible prog to set the root bg, 1840 * if user used some Esetroot compatible prog to set the root bg,
2291 if (ch == C0_LF) 2289 if (ch == C0_LF)
2292 nlines++; 2290 nlines++;
2293 2291
2294 refresh_count++; 2292 refresh_count++;
2295 2293
2296 if (!option (Opt_jumpScroll) 2294 if (!option (Opt_jumpScroll) || refresh_count >= nrow - 1)
2297 || (refresh_count >= refresh_limit * (nrow - 1)))
2298 { 2295 {
2299 refreshnow = true;
2300 refresh_count = 0; 2296 refresh_count = 0;
2297
2298 if (!option (Opt_skipScroll) || io_manager::now () > NOW + 1. / 60.)
2299 {
2300 refreshnow = true;
2301 ch = NOCHAR; 2301 ch = NOCHAR;
2302 break; 2302 break;
2303 }
2303 } 2304 }
2304 2305
2305 // scr_add_lines only works for nlines <= nrow - 1. 2306 // scr_add_lines only works for nlines <= nrow - 1.
2306 if (nlines >= nrow - 1) 2307 if (nlines >= nrow - 1)
2307 { 2308 {
2335 && HOOK_INVOKE ((this, HOOK_ADD_LINES, DT_WCS_LEN, buf, str - buf, DT_END)))) 2336 && HOOK_INVOKE ((this, HOOK_ADD_LINES, DT_WCS_LEN, buf, str - buf, DT_END))))
2336 scr_add_lines (buf, str - buf, nlines); 2337 scr_add_lines (buf, str - buf, nlines);
2337 2338
2338 /* 2339 /*
2339 * If there have been a lot of new lines, then update the screen 2340 * If there have been a lot of new lines, then update the screen
2340 * What the heck I'll cheat and only refresh less than every page-full. 2341 * What the heck we'll cheat and only refresh less than every page-full.
2341 * the number of pages between refreshes is refresh_limit, which 2342 * if skipScroll is enabled.
2342 * is incremented here because we must be doing flat-out scrolling.
2343 */ 2343 */
2344 if (refreshnow) 2344 if (refreshnow)
2345 { 2345 {
2346 if (option (Opt_jumpScroll) && refresh_limit < REFRESH_PERIOD)
2347 refresh_limit++;
2348 else
2349 {
2350 flag = true; 2346 flag = true;
2351 //TODO: due to popular request, implement "skipscroll" option here
2352 scr_refresh (); 2347 scr_refresh ();
2353 want_refresh = 1; 2348 want_refresh = 1;
2354 }
2355 } 2349 }
2356 2350
2357 } 2351 }
2358 else 2352 else
2359 { 2353 {
2580 process_dcs_seq (); 2574 process_dcs_seq ();
2581 break; 2575 break;
2582 case 0x9b: /* CSI */ 2576 case 0x9b: /* CSI */
2583 process_csi_seq (); 2577 process_csi_seq ();
2584 break; 2578 break;
2585 case 0x9d: /* CSI */ 2579 case 0x9d: /* OSC */
2586 process_osc_seq (); 2580 process_osc_seq ();
2587 break; 2581 break;
2588#endif 2582#endif
2589 } 2583 }
2590} 2584}
3441 break; 3435 break;
3442 case URxvt_Color_IT: 3436 case URxvt_Color_IT:
3443 process_color_seq (op, Color_IT, str, resp); 3437 process_color_seq (op, Color_IT, str, resp);
3444 break; 3438 break;
3445#endif 3439#endif
3446#if TRANSPARENT && TINTING 3440#if ENABLE_TRANSPARENCY && TINTING
3447 case URxvt_Color_tint: 3441 case URxvt_Color_tint:
3448 process_color_seq (op, Color_tint, str, resp); 3442 process_color_seq (op, Color_tint, str, resp);
3449 3443
3450 check_our_parents (); 3444 check_our_parents ();
3451 3445
3481#ifdef XPM_BACKGROUND 3475#ifdef XPM_BACKGROUND
3482 resize_pixmap (); 3476 resize_pixmap ();
3483 scr_touch (true); 3477 scr_touch (true);
3484#endif 3478#endif
3485 } 3479 }
3486#if TRANSPARENT && defined(HAVE_AFTERIMAGE) 3480#if ENABLE_TRANSPARENCY && defined(HAVE_AFTERIMAGE)
3487 if (option (Opt_transparent)) 3481 if (option (Opt_transparent))
3488 check_our_parents (); 3482 check_our_parents ();
3489#endif 3483#endif
3490 } 3484 }
3491 break; 3485 break;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines