XFree86 3.1.2E - xterm patch #15 - 1996/5/29 - T.Dickey This fixes the problem reported by David Dawes, by making the 50msec select timeout for the Xaw3d arrow scrollbar a resource. (I made it a boolean for a variety of reasons -- to make it a number, you'd need an additional resource, to avoid breaking the logic). -------------------------------------------------------------------------------- charproc.c | 13 +++++++!!!!!! ptyx.h | 1 + xterm.man | 5 +++++ 3 files changed, 13 insertions, 6 modifications -------------------------------------------------------------------------------- Index: charproc.c *** /build/x11r6/XFree86-3.1.2E/xc/programs/xterm/charproc.c Mon May 6 14:30:48 1996 --- /build/x11r6/XFree86-current/xc/programs/xterm/charproc.c Wed May 29 06:16:45 1996 *************** *** 194,199 **** --- 194,200 ---- #define XtNtiteInhibit "titeInhibit" #define XtNvisualBell "visualBell" #define XtNallowSendEvents "allowSendEvents" + #define XtNawaitInput "awaitInput" #define XtNcolor0 "color0" #define XtNcolor1 "color1" #define XtNcolor2 "color2" *************** *** 258,263 **** --- 259,265 ---- #define XtCTiteInhibit "TiteInhibit" #define XtCVisualBell "VisualBell" #define XtCAllowSendEvents "AllowSendEvents" + #define XtCAwaitInput "AwaitInput" #define XtCColorMode "ColorMode" #define XtCDynamicColors "DynamicColors" #define XtCUnderLine "UnderLine" *************** *** 549,554 **** --- 551,559 ---- {XtNallowSendEvents, XtCAllowSendEvents, XtRBoolean, sizeof(Boolean), XtOffsetOf(XtermWidgetRec, screen.allowSendEvents), XtRBoolean, (XtPointer) &defaultFALSE}, + {XtNawaitInput, XtCAwaitInput, XtRBoolean, sizeof(Boolean), + XtOffsetOf(XtermWidgetRec, screen.awaitInput), + XtRBoolean, (XtPointer) &defaultFALSE}, {"font1", "Font1", XtRString, sizeof(String), XtOffsetOf(XtermWidgetRec, screen.menu_font_names[fontMenu_font1]), XtRString, (XtPointer) NULL}, *************** *** 1683,1695 **** * a quick peek, i.e. timeout from the select() immediately. If * there's nothing pending, let select() block a little while, but * for a shorter interval than the arrow-style scrollbar timeout. */ if (XtAppPending(app_con)) ! select_timeout.tv_usec = 0; else select_timeout.tv_usec = 50000; i = select(max_plus1, &select_mask, &write_mask, NULL, ! &select_timeout); if (i < 0) { if (errno != EINTR) SysError(ERROR_SELECT); --- 1688,1704 ---- * a quick peek, i.e. timeout from the select() immediately. If * there's nothing pending, let select() block a little while, but * for a shorter interval than the arrow-style scrollbar timeout. + * The blocking is optional, because it tends to increase the load + * on the host. */ if (XtAppPending(app_con)) ! select_timeout.tv_usec = 0; else select_timeout.tv_usec = 50000; i = select(max_plus1, &select_mask, &write_mask, NULL, ! (select_timeout.tv_usec == 0) || screen->awaitInput ! ? &select_timeout ! : NULL); if (i < 0) { if (errno != EINTR) SysError(ERROR_SELECT); Index: ptyx.h *** /build/x11r6/XFree86-3.1.2E/xc/programs/xterm/ptyx.h Mon Mar 11 13:48:46 1996 --- /build/x11r6/XFree86-current/xc/programs/xterm/ptyx.h Wed May 29 06:05:39 1996 *************** *** 346,351 **** --- 346,352 ---- int select; /* xterm selected */ Boolean visualbell; /* visual bell mode */ Boolean allowSendEvents;/* SendEvent mode */ + Boolean awaitInput; /* select-timeout mode */ Boolean grabbedKbd; /* keyboard is grabbed */ #ifdef ALLOWLOGGING int logging; /* logging mode */ Index: xterm.man *** /build/x11r6/XFree86-3.1.2E/xc/programs/xterm/xterm.man Mon Mar 11 13:48:46 1996 --- /build/x11r6/XFree86-current/xc/programs/xterm/xterm.man Wed May 29 06:11:31 1996 *************** *** 596,601 **** --- 596,606 ---- Specifies whether or not auto-wraparound should be enabled. The default is ``true.'' .TP 8 + .B "awaitInput (\fPclass\fB AwaitInput)" + Specifies whether or not the xterm uses a 50 millisecond timeout to + await input (i.e., to support the Xaw3d arrow scrollbar). + The default is ``false.'' + .TP 8 .B "bellSuppressTime (\fPclass\fB BellSuppressTime)" Number of milliseconds after a bell command is sent during which additional bells will be suppressed. Default is 200. If set non-zero,