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.366 by ayin, Thu Nov 15 11:36:15 2007 UTC vs.
Revision 1.376 by root, Fri Dec 14 02:08:18 2007 UTC

1048{ 1048{
1049 make_current (); 1049 make_current ();
1050 1050
1051 display->flush (); 1051 display->flush ();
1052 1052
1053 if (want_refresh && !flush_ev.active) 1053 if (want_refresh && !flush_ev.is_active ())
1054 flush_ev.start (1. / 60.); // refresh at max. 60 hz normally 1054 flush_ev.start (1. / 60.); // refresh at max. 60 Hz normally
1055} 1055}
1056 1056
1057void 1057void
1058rxvt_term::flush_cb (ev::timer &w, int revents) 1058rxvt_term::flush_cb (ev::timer &w, int revents)
1059{ 1059{
1079 if (scr_refresh_rend (RS_Blink, RS_Blink)) 1079 if (scr_refresh_rend (RS_Blink, RS_Blink))
1080 { 1080 {
1081 hidden_text = !hidden_text; 1081 hidden_text = !hidden_text;
1082 want_refresh = 1; 1082 want_refresh = 1;
1083 } 1083 }
1084 else
1085 w.stop ();
1084} 1086}
1085#endif 1087#endif
1086 1088
1087#ifndef NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING 1089#ifndef NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING
1088void 1090void
1476 break; 1478 break;
1477 1479
1478 case MapNotify: 1480 case MapNotify:
1479 mapped = 1; 1481 mapped = 1;
1480#ifdef TEXT_BLINK 1482#ifdef TEXT_BLINK
1481 text_blink_ev.start (TEXT_BLINK_INTERVAL); 1483 text_blink_ev.start ();
1482#endif 1484#endif
1483 HOOK_INVOKE ((this, HOOK_MAP_NOTIFY, DT_XEVENT, &ev, DT_END)); 1485 HOOK_INVOKE ((this, HOOK_MAP_NOTIFY, DT_XEVENT, &ev, DT_END));
1484 break; 1486 break;
1485 1487
1486 case UnmapNotify: 1488 case UnmapNotify:
1577 int dist; 1579 int dist;
1578 1580
1579 /* don't clobber the current delay if we are 1581 /* don't clobber the current delay if we are
1580 * already in the middle of scrolling. 1582 * already in the middle of scrolling.
1581 */ 1583 */
1582 if (!sel_scroll_ev.active) 1584 if (!sel_scroll_ev.is_active ())
1583 sel_scroll_ev.start (SCROLLBAR_INITIAL_DELAY, SCROLLBAR_CONTINUOUS_DELAY); 1585 sel_scroll_ev.start (SCROLLBAR_INITIAL_DELAY, SCROLLBAR_CONTINUOUS_DELAY);
1584 1586
1585 /* save the event params so we can highlight 1587 /* save the event params so we can highlight
1586 * the selection in the pending-scroll loop 1588 * the selection in the pending-scroll loop
1587 */ 1589 */
1610 else 1612 else
1611 { 1613 {
1612 /* we are within the text window, so we 1614 /* we are within the text window, so we
1613 * shouldn't be scrolling 1615 * shouldn't be scrolling
1614 */ 1616 */
1615 if (sel_scroll_ev.active)
1616 sel_scroll_ev.stop(); 1617 sel_scroll_ev.stop();
1617 } 1618 }
1618#endif 1619#endif
1619#ifdef MOUSE_THRESHOLD 1620#ifdef MOUSE_THRESHOLD
1620 } 1621 }
1621#endif 1622#endif
1685 XSetICFocus (Input_Context); 1686 XSetICFocus (Input_Context);
1686 } 1687 }
1687#endif 1688#endif
1688#if CURSOR_BLINK 1689#if CURSOR_BLINK
1689 if (option (Opt_cursorBlink)) 1690 if (option (Opt_cursorBlink))
1690 cursor_blink_ev.start (CURSOR_BLINK_INTERVAL, CURSOR_BLINK_INTERVAL); 1691 cursor_blink_ev.again ();
1691#endif 1692#endif
1692#if OFF_FOCUS_FADING 1693#if OFF_FOCUS_FADING
1693 if (rs[Rs_fade]) 1694 if (rs[Rs_fade])
1694 { 1695 {
1695 pix_colors = pix_colors_focused; 1696 pix_colors = pix_colors_focused;
1957 } 1958 }
1958 else 1959 else
1959#endif /* NO_SCROLLBAR_REPORT */ 1960#endif /* NO_SCROLLBAR_REPORT */
1960 1961
1961 { 1962 {
1962 char upordown = 0; 1963 char upordown = 0;
1963 1964
1964 if (scrollBar.style == R_SB_NEXT) 1965 if (scrollBar.style == R_SB_NEXT)
1965 { 1966 {
1966 if (scrollbarnext_upButton (ev.y)) 1967 if (scrollbarnext_upButton (ev.y))
1967 upordown = -1; /* up */ 1968 upordown = -1; /* up */
1973 if (scrollbarrxvt_upButton (ev.y)) 1974 if (scrollbarrxvt_upButton (ev.y))
1974 upordown = -1; /* up */ 1975 upordown = -1; /* up */
1975 else if (scrollbarrxvt_dnButton (ev.y)) 1976 else if (scrollbarrxvt_dnButton (ev.y))
1976 upordown = 1; /* down */ 1977 upordown = 1; /* down */
1977 } 1978 }
1979
1978 if (upordown) 1980 if (upordown)
1979 { 1981 {
1980#ifndef NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING 1982#ifndef NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING
1983 if (!cont_scroll_ev.is_active ())
1981 cont_scroll_ev.start (SCROLLBAR_INITIAL_DELAY, SCROLLBAR_CONTINUOUS_DELAY); 1984 cont_scroll_ev.start (SCROLLBAR_INITIAL_DELAY, SCROLLBAR_CONTINUOUS_DELAY);
1982#endif 1985#endif
1983 if (scr_page (upordown < 0 ? UP : DN, 1)) 1986 if (scr_page (upordown < 0 ? UP : DN, 1))
1984 { 1987 {
1985 if (upordown < 0) 1988 if (upordown < 0)
1986 scrollBar.setUp (); 1989 scrollBar.setUp ();
2066 scrollBar.setIdle (); 2069 scrollBar.setIdle ();
2067 scrollbar_show (0); 2070 scrollbar_show (0);
2068 } 2071 }
2069 2072
2070#ifdef SELECTION_SCROLLING 2073#ifdef SELECTION_SCROLLING
2071 if (sel_scroll_ev.active)
2072 sel_scroll_ev.stop(); 2074 sel_scroll_ev.stop();
2073#endif 2075#endif
2074 2076
2075 if (ev.window == vt) 2077 if (ev.window == vt)
2076 { 2078 {
2077 if (HOOK_INVOKE ((this, HOOK_BUTTON_RELEASE, DT_XEVENT, &ev, DT_END))) 2079 if (HOOK_INVOKE ((this, HOOK_BUTTON_RELEASE, DT_XEVENT, &ev, DT_END)))
2149 { 2151 {
2150 mouse_slip_wheel_speed += v ? -1 : 1; 2152 mouse_slip_wheel_speed += v ? -1 : 1;
2151 if (mouse_slip_wheel_speed < -nrow) mouse_slip_wheel_speed = -nrow; 2153 if (mouse_slip_wheel_speed < -nrow) mouse_slip_wheel_speed = -nrow;
2152 if (mouse_slip_wheel_speed > +nrow) mouse_slip_wheel_speed = +nrow; 2154 if (mouse_slip_wheel_speed > +nrow) mouse_slip_wheel_speed = +nrow;
2153 2155
2156 if (!slip_wheel_ev.is_active ())
2154 slip_wheel_ev.start (SCROLLBAR_CONTINUOUS_DELAY, SCROLLBAR_CONTINUOUS_DELAY); 2157 slip_wheel_ev.start (SCROLLBAR_CONTINUOUS_DELAY, SCROLLBAR_CONTINUOUS_DELAY);
2155 } 2158 }
2156 else 2159 else
2157 { 2160 {
2158# endif 2161# endif
2159 scr_page (v, i); 2162 scr_page (v, i);
2227 2230
2228 if (!option (Opt_jumpScroll) || refresh_count >= nrow - 1) 2231 if (!option (Opt_jumpScroll) || refresh_count >= nrow - 1)
2229 { 2232 {
2230 refresh_count = 0; 2233 refresh_count = 0;
2231 2234
2232 if (!option (Opt_skipScroll) || ev::ev_time () > ev::now () + 1. / 60.) 2235 if (!option (Opt_skipScroll) || ev_time () > ev::now () + 1. / 60.)
2233 { 2236 {
2234 refreshnow = true; 2237 refreshnow = true;
2235 ch = NOCHAR; 2238 ch = NOCHAR;
2236 break; 2239 break;
2237 } 2240 }
2751 nargs = 0; 2754 nargs = 0;
2752 2755
2753 priv = 0; 2756 priv = 0;
2754 ch = cmd_getc (); 2757 ch = cmd_getc ();
2755 if (ch >= '<' && ch <= '?') 2758 if (ch >= '<' && ch <= '?')
2759 {
2756 { /* '<' '=' '>' '?' */ 2760 /* '<' '=' '>' '?' */
2757 priv = ch; 2761 priv = ch;
2758 ch = cmd_getc (); 2762 ch = cmd_getc ();
2759 } 2763 }
2760 2764
2761 /* read any numerical arguments */ 2765 /* read any numerical arguments */
3581 { 66, PrivMode_aplKP }, 3585 { 66, PrivMode_aplKP },
3582#ifndef NO_BACKSPACE_KEY 3586#ifndef NO_BACKSPACE_KEY
3583 { 67, PrivMode_BackSpace }, 3587 { 67, PrivMode_BackSpace },
3584#endif 3588#endif
3585 { 1000, PrivMode_MouseX11 }, 3589 { 1000, PrivMode_MouseX11 },
3586 // 1001 Use Hilite Mouse Tracking. NYI, TODO
3587 { 1002, PrivMode_MouseBtnEvent }, 3590 { 1002, PrivMode_MouseBtnEvent },
3588 { 1003, PrivMode_MouseAnyEvent }, 3591 { 1003, PrivMode_MouseAnyEvent },
3589 { 1010, PrivMode_TtyOutputInh }, // rxvt extension 3592 { 1010, PrivMode_TtyOutputInh }, // rxvt extension
3590 { 1011, PrivMode_Keypress }, // rxvt extension 3593 { 1011, PrivMode_Keypress }, // rxvt extension
3591 // 1035 enable modifiers for alt, numlock NYI 3594 // 1035 enable modifiers for alt, numlock NYI
3692 /* case 67: - backspace key */ 3695 /* case 67: - backspace key */
3693 case 1000: /* X11 mouse reporting */ 3696 case 1000: /* X11 mouse reporting */
3694 if (state) /* orthogonal */ 3697 if (state) /* orthogonal */
3695 priv_modes &= ~(PrivMode_MouseX10|PrivMode_MouseBtnEvent|PrivMode_MouseAnyEvent); 3698 priv_modes &= ~(PrivMode_MouseX10|PrivMode_MouseBtnEvent|PrivMode_MouseAnyEvent);
3696 break; 3699 break;
3697#if 0
3698 case 1001:
3699 break; /* X11 mouse highlighting */
3700#endif
3701 case 1002: 3700 case 1002:
3702 case 1003: 3701 case 1003:
3703 if (state) 3702 if (state)
3704 { 3703 {
3705 priv_modes &= ~(PrivMode_MouseX10|PrivMode_MouseX11); 3704 priv_modes &= ~(PrivMode_MouseX10|PrivMode_MouseX11);
3894rxvt_term::process_graphics () 3893rxvt_term::process_graphics ()
3895{ 3894{
3896 unicode_t ch, cmd = cmd_getc (); 3895 unicode_t ch, cmd = cmd_getc ();
3897 3896
3898 if (cmd == 'Q') 3897 if (cmd == 'Q')
3898 {
3899 { /* query graphics */ 3899 /* query graphics */
3900 tt_printf ("\033G0\012"); /* no graphics */ 3900 tt_printf ("\033G0\012"); /* no graphics */
3901 return; 3901 return;
3902 } 3902 }
3903 /* swallow other graphics sequences until terminating ':' */ 3903 /* swallow other graphics sequences until terminating ':' */
3904 do 3904 do

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines