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.226 by root, Sun Jan 1 15:03:49 2006 UTC vs.
Revision 1.228 by root, Mon Jan 2 16:08:34 2006 UTC

43 * along with this program; if not, write to the Free Software 43 * along with this program; if not, write to the Free Software
44 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 44 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
45 *----------------------------------------------------------------------*/ 45 *----------------------------------------------------------------------*/
46 46
47/*{{{ includes: */ 47/*{{{ includes: */
48#include "../config.h" /* NECESSARY */ 48#include "../config.h"
49#include "rxvt.h" /* NECESSARY */ 49#include "rxvt.h"
50#include "rxvtperl.h"
50#include "version.h" 51#include "version.h"
51#include "command.h" 52#include "command.h"
52 53
53#if HAVE_SCHED_YIELD 54#if HAVE_SCHED_YIELD
54# include <sched.h> 55# include <sched.h>
1069 w.start (w.at + SCROLLBAR_CONTINUOUS_DELAY); 1070 w.start (w.at + SCROLLBAR_CONTINUOUS_DELAY);
1070 } 1071 }
1071} 1072}
1072#endif 1073#endif
1073 1074
1075#if HAVE_SCHED_YIELD
1076static struct event_handler
1077{
1078 check_watcher cw_yield;
1079
1080 void yield (check_watcher &w)
1081 {
1082 sched_yield ();
1083 w.stop ();
1084 }
1085
1086 event_handler ()
1087 : cw_yield (this, &event_handler::yield)
1088 {
1089 }
1090} event_handler;
1091#endif
1092
1074bool 1093bool
1075rxvt_term::pty_fill () 1094rxvt_term::pty_fill ()
1076{ 1095{
1077 ssize_t n = cmdbuf_endp - cmdbuf_ptr; 1096 ssize_t n = cmdbuf_endp - cmdbuf_ptr;
1078 1097
1094 return true; 1113 return true;
1095 } 1114 }
1096 else if (r < 0 && (errno == EAGAIN || errno == EINTR)) 1115 else if (r < 0 && (errno == EAGAIN || errno == EINTR))
1097 { 1116 {
1098#if HAVE_SCHED_YIELD 1117#if HAVE_SCHED_YIELD
1099 sched_yield (); 1118 if (display->is_local)
1119 event_handler.cw_yield.start ();
1100#endif 1120#endif
1101 } 1121 }
1102 else 1122 else
1103 { 1123 {
1104 pty_ev.stop (); 1124 pty_ev.stop ();
1680{ 1700{
1681 if (!focus) 1701 if (!focus)
1682 { 1702 {
1683 focus = 1; 1703 focus = 1;
1684 want_refresh = 1; 1704 want_refresh = 1;
1705
1706 PERL_INVOKE ((this, HOOK_FOCUS_OUT, DT_END));
1707
1685#if USE_XIM 1708#if USE_XIM
1686 if (Input_Context != NULL) 1709 if (Input_Context != NULL)
1687 { 1710 {
1688 IMSetStatusPosition (); 1711 IMSetStatusPosition ();
1689 XSetICFocus (Input_Context); 1712 XSetICFocus (Input_Context);
1709 if (focus) 1732 if (focus)
1710 { 1733 {
1711 focus = 0; 1734 focus = 0;
1712 want_refresh = 1; 1735 want_refresh = 1;
1713 1736
1737 PERL_INVOKE ((this, HOOK_FOCUS_OUT, DT_END));
1738
1714#if ENABLE_FRILLS || ISO_14755 1739#if ENABLE_FRILLS || ISO_14755
1740 if (iso14755buf)
1741 {
1715 iso14755buf = 0; 1742 iso14755buf = 0;
1716#endif
1717#if ENABLE_OVERLAY 1743# if ENABLE_OVERLAY
1718 scr_overlay_off (); 1744 scr_overlay_off ();
1745# endif
1746 }
1719#endif 1747#endif
1720#if USE_XIM 1748#if USE_XIM
1721 if (Input_Context != NULL) 1749 if (Input_Context != NULL)
1722 XUnsetICFocus (Input_Context); 1750 XUnsetICFocus (Input_Context);
1723#endif 1751#endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines