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.262 by root, Sun Jan 15 06:02:40 2006 UTC vs.
Revision 1.266 by root, Mon Jan 16 08:57:02 2006 UTC

443 scr_move_to (0, 1); 443 scr_move_to (0, 1);
444 return; 444 return;
445 } 445 }
446 else if (keysym == XK_End) 446 else if (keysym == XK_End)
447 { 447 {
448 scr_move_to (1, 0); 448 scr_move_to (1, 1);
449 return; 449 return;
450 } 450 }
451 } 451 }
452#endif 452#endif
453 } 453 }
1021} 1021}
1022 1022
1023void 1023void
1024rxvt_term::check_cb (check_watcher &w) 1024rxvt_term::check_cb (check_watcher &w)
1025{ 1025{
1026 SET_R (this); 1026 make_current ();
1027 SET_LOCALE (locale);
1028 1027
1029 display->flush (); 1028 display->flush ();
1030 1029
1031 if (want_refresh && !flush_ev.active) 1030 if (want_refresh && !flush_ev.active)
1032 flush_ev.start (NOW + 1. / 60.); // refresh at max. 60 hz normally 1031 flush_ev.start (NOW + 1. / 60.); // refresh at max. 60 hz normally
1033} 1032}
1034 1033
1035void 1034void
1036rxvt_term::flush_cb (time_watcher &w) 1035rxvt_term::flush_cb (time_watcher &w)
1037{ 1036{
1038 SET_R (this); 1037 make_current ();
1039 SET_LOCALE (locale);
1040 1038
1041 refresh_limit = 1; 1039 refresh_limit = 1;
1042 refresh_count = 0; 1040 refresh_count = 0;
1043 flush (); 1041 flush ();
1044} 1042}
1172} 1170}
1173 1171
1174void 1172void
1175rxvt_term::pty_cb (io_watcher &w, short revents) 1173rxvt_term::pty_cb (io_watcher &w, short revents)
1176{ 1174{
1177 SET_R (this); 1175 make_current ();
1178 SET_LOCALE (locale);
1179 1176
1180 if (revents & EVENT_READ) 1177 if (revents & EVENT_READ)
1181 // loop, but don't allow a single term to monopolize us 1178 // loop, but don't allow a single term to monopolize us
1182 while (pty_fill ()) 1179 while (pty_fill ())
1183 if (cmd_parse ()) 1180 if (cmd_parse ())
1215} 1212}
1216 1213
1217void 1214void
1218rxvt_term::pointer_cb (time_watcher &w) 1215rxvt_term::pointer_cb (time_watcher &w)
1219{ 1216{
1220 SET_R (this); 1217 make_current ();
1221 SET_LOCALE (locale);
1222 1218
1223 pointer_blank (); 1219 pointer_blank ();
1224} 1220}
1225#endif 1221#endif
1226 1222
1305 1301
1306/*{{{ process an X event */ 1302/*{{{ process an X event */
1307void 1303void
1308rxvt_term::x_cb (XEvent &ev) 1304rxvt_term::x_cb (XEvent &ev)
1309{ 1305{
1306 make_current ();
1307
1310 dDisp; 1308 dDisp;
1311 1309
1312 SET_R (this);
1313 SET_LOCALE (locale);
1314
1315 if (ev.xany.window == vt 1310 if (ev.xany.window == vt
1311 && SHOULD_INVOKE (HOOK_X_EVENT)
1316 && HOOK_INVOKE ((this, HOOK_X_EVENT, DT_XEVENT, &ev, DT_END))) 1312 && HOOK_INVOKE ((this, HOOK_X_EVENT, DT_XEVENT, &ev, DT_END)))
1317 return; 1313 return;
1318 1314
1319 // for XQueryPointer 1315 // for XQueryPointer
1320 Window unused_root, unused_child; 1316 Window unused_root, unused_child;
1620 if ((priv_modes & PrivMode_mouse_report) && !bypass_keystate) 1616 if ((priv_modes & PrivMode_mouse_report) && !bypass_keystate)
1621 break; 1617 break;
1622 1618
1623 if (ev.xany.window == vt) 1619 if (ev.xany.window == vt)
1624 { 1620 {
1621 if (SHOULD_INVOKE (HOOK_MOTION_NOTIFY)
1625 if (HOOK_INVOKE ((this, HOOK_MOTION_NOTIFY, DT_XEVENT, &ev, DT_END))) 1622 && HOOK_INVOKE ((this, HOOK_MOTION_NOTIFY, DT_XEVENT, &ev, DT_END)))
1626 ; // nop 1623 ; // nop
1627 else if (ev.xbutton.state & (Button1Mask | Button3Mask)) 1624 else if (ev.xbutton.state & (Button1Mask | Button3Mask))
1628 { 1625 {
1629 while (XCheckTypedWindowEvent (disp, vt, MotionNotify, &ev)) 1626 while (XCheckTypedWindowEvent (disp, vt, MotionNotify, &ev))
1630 ; 1627 ;
1822 1819
1823#if TRANSPARENT 1820#if TRANSPARENT
1824void 1821void
1825rxvt_term::rootwin_cb (XEvent &ev) 1822rxvt_term::rootwin_cb (XEvent &ev)
1826{ 1823{
1827 SET_R (this); 1824 make_current ();
1828 SET_LOCALE (locale);
1829 1825
1830 switch (ev.type) 1826 switch (ev.type)
1831 { 1827 {
1832 case PropertyNotify: 1828 case PropertyNotify:
1833 /* 1829 /*
2784 } 2780 }
2785 2781
2786 // scr_add_lines only works for nlines <= nrow - 1. 2782 // scr_add_lines only works for nlines <= nrow - 1.
2787 if (nlines >= nrow - 1) 2783 if (nlines >= nrow - 1)
2788 { 2784 {
2785 if (!(SHOULD_INVOKE (HOOK_ADD_LINES)
2789 if (!HOOK_INVOKE ((this, HOOK_ADD_LINES, DT_WCS_LEN, buf, str - buf, DT_END))) 2786 && HOOK_INVOKE ((this, HOOK_ADD_LINES, DT_WCS_LEN, buf, str - buf, DT_END))))
2790 scr_add_lines (buf, str - buf, nlines); 2787 scr_add_lines (buf, str - buf, nlines);
2791 2788
2792 nlines = 0; 2789 nlines = 0;
2793 str = buf; 2790 str = buf;
2794 eol = str + min (ncol, UBUFSIZ); 2791 eol = str + min (ncol, UBUFSIZ);
2809 2806
2810 seq_begin = cmdbuf_ptr; 2807 seq_begin = cmdbuf_ptr;
2811 ch = next_char (); 2808 ch = next_char ();
2812 } 2809 }
2813 2810
2811 if (!(SHOULD_INVOKE (HOOK_ADD_LINES)
2814 if (!HOOK_INVOKE ((this, HOOK_ADD_LINES, DT_WCS_LEN, buf, str - buf, DT_END))) 2812 && HOOK_INVOKE ((this, HOOK_ADD_LINES, DT_WCS_LEN, buf, str - buf, DT_END))))
2815 scr_add_lines (buf, str - buf, nlines); 2813 scr_add_lines (buf, str - buf, nlines);
2816 2814
2817 /* 2815 /*
2818 * If there have been a lot of new lines, then update the screen 2816 * If there have been a lot of new lines, then update the screen
2819 * What the heck I'll cheat and only refresh less than every page-full. 2817 * What the heck I'll cheat and only refresh less than every page-full.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines