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.263 by root, Sun Jan 15 16:48:17 2006 UTC vs.
Revision 1.265 by root, Mon Jan 16 08:29:57 2006 UTC

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 /*

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines