XFree86 3.1.2Ec - xterm patch #23 - T.Dickey
This removes the blinking cursor I added last week (for performance reasons).
Time-permitting, I'll revisit this after 3.2 is released (there _will_ be more
work after XFree86 3.2, I assume).
To do:
+ fix the unneeded allocation I observed when colorMode is disabled
+ implement ech and ech1
--------------------------------------------------------------------------------
charproc.c | 28 +++++++++++++++++++++++-----
ptyx.h | 3 +++
xterm.man | 10 +++++-----
3 files changed, 31 insertions, 10 deletions
--------------------------------------------------------------------------------
Index: charproc.c
--- xterm-22+/charproc.c Sat Jul 27 15:57:12 1996
+++ xterm-23/charproc.c Wed Jul 31 06:50:59 1996
@@ -121,12 +121,9 @@
static int finput PROTO((void));
static int in_put PROTO((void));
static int set_character_class PROTO((char *s));
-static void BlinkCursor PROTO(( XtPointer closure, XtIntervalId* id));
static void DoSetSelectedFont PROTO_XT_SEL_CB_ARGS;
static void FromAlternate PROTO((TScreen *screen));
static void RequestResize PROTO((XtermWidget termw, int rows, int cols, int text));
-static void StartBlinking PROTO((TScreen *screen));
-static void StopBlinking PROTO((TScreen *screen));
static void SwitchBufs PROTO((TScreen *screen));
static void ToAlternate PROTO((TScreen *screen));
static void VTGraphicsOrNoExpose PROTO((XEvent *event));
@@ -147,6 +144,15 @@
static void update_font_info PROTO((TScreen *screen, Bool doresize));
static void window_ops PROTO((XtermWidget termw));
+#if OPT_BLINK_CURS
+static void BlinkCursor PROTO(( XtPointer closure, XtIntervalId* id));
+static void StartBlinking PROTO((TScreen *screen));
+static void StopBlinking PROTO((TScreen *screen));
+#else
+#define StartBlinking(screen) /* nothing */
+#define StopBlinking(screen) /* nothing */
+#endif
+
#define DEFAULT -1
#define TEXT_BUF_SIZE 256
#define TRACKTIMESEC 4L
@@ -313,10 +319,13 @@
static int defaultScrollLines = SCROLLLINES;
static int defaultNMarginBell = N_MARGINBELL;
static int defaultMultiClickTime = MULTICLICKTIME;
-static int defaultBlinkTime = 0;
static int defaultBellSuppressTime = BELLSUPPRESSMSEC;
static char * _Font_Selected_ = "yes"; /* string is arbitrary */
+#if OPT_BLINK_CURS
+static int defaultBlinkTime = 0;
+#endif
+
/*
* Warning, the following must be kept under 1024 bytes or else some
* compilers (particularly AT&T 6386 SVR3.2) will barf). Workaround is to
@@ -447,9 +456,11 @@
{XtNcursorColor, XtCForeground, XtRPixel, sizeof(Pixel),
XtOffsetOf(XtermWidgetRec, screen.cursorcolor),
XtRString, "XtDefaultForeground"},
+#if OPT_BLINK_CURS
{XtNcursorBlinkTime, XtCCursorBlinkTime, XtRInt, sizeof(int),
XtOffsetOf(XtermWidgetRec, screen.cursor_blink),
XtRInt, (XtPointer) &defaultBlinkTime},
+#endif
{XtNeightBitInput, XtCEightBitInput, XtRBoolean, sizeof(Boolean),
XtOffsetOf(XtermWidgetRec, screen.input_eight_bits),
XtRBoolean, (XtPointer) &defaultTRUE},
@@ -1745,9 +1756,12 @@
* on the host.
*/
if (XtAppPending(app_con)
+#if OPT_BLINK_CURS
|| (screen->cursor_blink > 0
&& (screen->select || screen->always_highlight))
- || screen->cursor_state == BLINKED_OFF)
+ || screen->cursor_state == BLINKED_OFF
+#endif
+ )
select_timeout.tv_usec = 0;
else
select_timeout.tv_usec = 50000;
@@ -2834,7 +2848,9 @@
new->screen.hp_ll_bc = request->screen.hp_ll_bc;
new->screen.foreground = request->screen.foreground;
new->screen.cursorcolor = request->screen.cursorcolor;
+#if OPT_BLINK_CURS
new->screen.cursor_blink = request->screen.cursor_blink;
+#endif
new->screen.border = request->screen.border;
new->screen.jumpscroll = request->screen.jumpscroll;
#ifdef ALLOWLOGGING
@@ -3457,6 +3473,7 @@
resetXtermGC(screen, flags, in_selection);
}
+#if OPT_BLINK_CURS
static void
StartBlinking(screen)
TScreen *screen;
@@ -3511,6 +3528,7 @@
StartBlinking(screen);
xevents();
}
+#endif /* OPT_BLINK_CURS */
void
VTReset(full)
Index: ptyx.h
--- xterm-22+/ptyx.h Sat Jul 27 11:17:14 1996
+++ xterm-23/ptyx.h Wed Jul 31 06:54:32 1996
@@ -276,6 +276,7 @@
/***====================================================================***/
#define OPT_ISO_COLORS 1 /* true if xterm is configured with ISO colors */
+#define OPT_BLINK_CURS 0 /* FIXME: do this later (96/7/31) */
/***====================================================================***/
@@ -397,8 +398,10 @@
XPoint *box; /* draw unselected cursor */
int cursor_state; /* ON, OFF, or BLINKED_OFF */
+#if OPT_BLINK_CURS
int cursor_blink; /* blink-rate (0=off) msecs */
XtIntervalId cursor_timer; /* timer-id for cursor-proc */
+#endif
int cursor_set; /* requested state */
int cursor_col; /* previous cursor column */
int cursor_row; /* previous cursor row */
Index: xterm.man
--- xterm-22+/xterm.man Sat Jul 27 16:17:57 1996
+++ xterm-23/xterm.man Wed Jul 31 06:42:36 1996
@@ -719,11 +719,11 @@
class name instead of the instance name is an easy way to have everything
that would normally appear in the text color change color. The default
is ``black.''
-.TP 8
-.B "cursorBlinkTime (\fPclass\fB CursorBlinkTime)"
-Specifies the cursor blink cycle-time
-(i.e., the time to turn the cursor on and off).
-The default is 0, which disables blinking.
+.\" .TP 8
+.\" .B "cursorBlinkTime (\fPclass\fB CursorBlinkTime)"
+.\" Specifies the cursor blink cycle-time
+.\" (i.e., the time to turn the cursor on and off).
+.\" The default is 0, which disables blinking.
.TP 8
.B "cursorColor (\fPclass\fB Foreground)"
Specifies the color to use for the text cursor. The default is ``black.''