# ------------------------------------------------------------------------------
# Makefile.in | 6 -
# aclocal.m4 | 19 ++++++
# button.c | 151 +++++++++++++++++++++++++++++++++++++-----------
# charproc.c | 66 +++++++++++++-------
# configure | 118 ++++++++++++++++++++++++++-----------
# configure.in | 2
# ctlseqs.ms | 120 ++++++++++++++++++++++++++++----------
# input.c | 6 +
# main.c | 3
# misc.c | 7 ++
# ptyx.h | 4 +
# screen.c | 3
# trace.c | 8 ++
# version.h | 2
# xterm-83/xcharmouse.h | 56 +++++++++++++++++
# xterm.log.html | 28 ++++++++
# xterm.man | 8 +-
# 17 files changed, 473 insertions, 134 deletions
# ------------------------------------------------------------------------------
Index: Makefile.in
--- xterm-82+/Makefile.in Sun Jul 5 16:05:39 1998
+++ xterm-83/Makefile.in Mon Aug 24 21:56:08 1998
@@ -78,13 +78,13 @@
main.o: version.h
xterm : $(OBJS1)
- $(LINK) $(LDFLAGS) -o $@ $(OBJS1) $(X_LIBS) $(X_EXTRA_LIBS) $(LIBS) $(EXTRA_LOADFLAGS)
+ @ECHO_LD@$(LINK) $(LDFLAGS) -o $@ $(OBJS1) $(X_LIBS) $(X_EXTRA_LIBS) $(LIBS) $(EXTRA_LOADFLAGS)
resize : $(OBJS2)
- $(LINK) $(LDFLAGS) -o $@ $(OBJS2) $(X_LIBS) $(X_EXTRA_LIBS) $(LIBS)
+ @ECHO_LD@$(LINK) $(LDFLAGS) -o $@ $(OBJS2) $(X_LIBS) $(X_EXTRA_LIBS) $(LIBS)
install: $(INSTALL_DIRS) xterm resize
- $(INSTALL_PROGRAM) -s -m 4711 xterm $(bindir)/xterm
+ $(INSTALL_PROGRAM) -s -m @XTERM_MODE@ xterm $(bindir)/xterm
$(INSTALL_PROGRAM) -s -m 755 resize $(bindir)/resize
$(INSTALL_DATA) xterm.man $(mandir)/xterm.$(manext)
$(INSTALL_DATA) resize.man $(mandir)/resize.$(manext)
Index: aclocal.m4
--- xterm-82+/aclocal.m4 Fri Jun 5 16:23:53 1998
+++ xterm-83/aclocal.m4 Mon Aug 24 21:58:10 1998
@@ -695,3 +695,22 @@
to makefile.])
fi
])dnl
+dnl ---------------------------------------------------------------------------
+dnl Check if xterm is installed setuid, assume we want to do the same on a
+dnl new install
+AC_DEFUN([CF_XTERM_MODE],[
+AC_PATH_PROG(XTERM_PATH,xterm)
+XTERM_MODE=755
+AC_MSG_CHECKING(for presumed installation-mode)
+if test -f "$XTERM_PATH" ; then
+ ls -l $XTERM_PATH >conftest.out
+ read cf_mode cf_rest <conftest.out
+ case ".$cf_mode" in #(vi
+ .???s*)
+ XTERM_MODE=4711
+ ;;
+ esac
+fi
+AC_MSG_RESULT($XTERM_MODE)
+AC_SUBST(XTERM_MODE)
+])dnl
Index: button.c
--- xterm-82+/button.c Sat Jul 18 13:11:26 1998
+++ xterm-83/button.c Mon Aug 24 22:05:03 1998
@@ -52,13 +52,14 @@
#include "menu.h"
#include "xterm.h"
+#include "xcharmouse.h"
#define KeyState(x) (((x) & (ShiftMask|ControlMask)) + (((x) & Mod1Mask) ? 2 : 0))
/* adds together the bits:
shift key -> 1
meta key -> 2
control key -> 4 */
-
+
#define TEXTMODES 4
#define NBUTS 3
#define DIRS 2
@@ -68,9 +69,6 @@
#define Coordinate(r,c) ((r) * (term->screen.max_col+1) + (c))
-extern char *xterm_name;
-extern XtermWidget term;
-
/* Selection/extension variables */
/* Raw char position where the selection started */
@@ -121,16 +119,22 @@
Boolean SendMousePosition(Widget w, XEvent* event)
{
- register TScreen *screen;
+ TScreen *screen;
if (!IsXtermWidget(w))
return False;
screen = &((XtermWidget)w)->screen;
-
- if (screen->send_mouse_pos == 0) return False;
- if (event->type != ButtonPress && event->type != ButtonRelease)
+ /* If send_mouse_pos mode isn't on, we shouldn't be here */
+ if (screen->send_mouse_pos == MOUSE_OFF)
+ return False;
+
+ /* Make sure the event is an appropriate type */
+ if ((screen->send_mouse_pos != BTN_EVENT_MOUSE)
+ && (screen->send_mouse_pos != ANY_EVENT_MOUSE)
+ && event->type != ButtonPress
+ && event->type != ButtonRelease)
return False;
#define KeyModifiers \
@@ -142,7 +146,7 @@
Mod2Mask | Mod3Mask | Mod4Mask | Mod5Mask ))
switch (screen->send_mouse_pos) {
- case 1: /* X10 compatibility sequences */
+ case X10_MOUSE: /* X10 compatibility sequences */
if (KeyModifiers == 0) {
if (event->type == ButtonPress)
@@ -151,7 +155,7 @@
}
return False;
- case 2: /* DEC vt200 compatible */
+ case VT200_MOUSE: /* DEC vt200 compatible */
if (KeyModifiers == 0 || KeyModifiers == ControlMask) {
EditorButton((XButtonEvent *)event);
@@ -159,7 +163,7 @@
}
return False;
- case 3: /* DEC vt200 hilite tracking */
+ case VT200_HIGHLIGHT_MOUSE: /* DEC vt200 hilite tracking */
if ( event->type == ButtonPress &&
KeyModifiers == 0 &&
event->xbutton.button == Button1 ) {
@@ -170,7 +174,17 @@
EditorButton((XButtonEvent *)event);
return True;
}
- /* FALLTHRU */
+ return False;
+
+ /* xterm extension for motion reporting. June 1998 */
+ /* EditorButton() will distinguish between the modes */
+ case BTN_EVENT_MOUSE:
+ case ANY_EVENT_MOUSE:
+ if (KeyModifiers == 0 || KeyModifiers == ControlMask) {
+ EditorButton((XButtonEvent *)event);
+ return True;
+ }
+ return False;
default:
return False;
@@ -234,6 +248,9 @@
}
+/*
+ * This function handles button-motion events
+ */
/*ARGSUSED*/
void HandleSelectExtend(
Widget w,
@@ -250,14 +267,21 @@
screen = &((XtermWidget)w)->screen;
screen->selection_time = event->xmotion.time;
switch (eventMode) {
+ /* If not in one of the DEC mouse-reporting modes */
case LEFTEXTENSION :
case RIGHTEXTENSION :
- PointToRowCol (event->xmotion.y, event->xmotion.x,
+ PointToRowCol (event->xmotion.y, event->xmotion.x,
&row, &col);
ExtendExtend (row, col);
break;
+
+ /* If in motion reporting mode, send mouse position to
+ character process as a key sequence \E[M... */
case NORMAL :
- /* will get here if send_mouse_pos != 0 */
+ /* will get here if send_mouse_pos != MOUSE_OFF */
+ if ( screen->send_mouse_pos == BTN_EVENT_MOUSE
+ || screen->send_mouse_pos == ANY_EVENT_MOUSE )
+ SendMousePosition(w,event);
break;
}
}
@@ -549,7 +573,7 @@
/* set start of selection */
rawRow = startrow;
rawCol = startcol;
-
+
} /* else use old values in rawRow, Col */
saveStartRRow = startERow = rawRow;
@@ -579,7 +603,7 @@
{
int row, col, count;
TScreen *screen = &term->screen;
- unsigned char line[9];
+ Char line[9];
if (use_cursor_loc) {
row = screen->cursor_row;
@@ -598,7 +622,7 @@
line[count++] = ESC;
line[count++] = '[';
}
- if (rawRow == startSRow && rawCol == startSCol
+ if (rawRow == startSRow && rawCol == startSCol
&& row == endSRow && col == endSCol) {
/* Use short-form emacs select */
line[count++] = 't';
@@ -714,9 +738,9 @@
ExtendExtend (int row, int col)
{
int coord = Coordinate(row, col);
-
+
TRACE(("ExtendExtend row=%d, col=%d\n", row, col))
- if (eventMode == LEFTEXTENSION
+ if (eventMode == LEFTEXTENSION
&& (coord + (selectUnit!=SELECTCHAR)) > Coordinate(endSRow, endSCol)) {
/* Whoops, he's changed his mind. Do RIGHTEXTENSION */
eventMode = RIGHTEXTENSION;
@@ -853,7 +877,7 @@
ch--, i--)
;
return(i);
-}
+}
/*
** double click table for cut and paste in 8 bits
@@ -886,7 +910,7 @@
64, 48, 48, 48, 48, 48, 48, 48,
/* H I J K L M N O */
48, 48, 48, 48, 48, 48, 48, 48,
-/* P Q R S T U V W */
+/* P Q R S T U V W */
48, 48, 48, 48, 48, 48, 48, 48,
/* X Y Z [ \ ] ^ _ */
48, 48, 48, 91, 92, 93, 94, 48,
@@ -918,7 +942,7 @@
48, 48, 48, 48, 48, 48, 48, 48,
/* E` E' E^ E: I` I' I^ I: */
48, 48, 48, 48, 48, 48, 48, 48,
-/* D- N~ O` O' O^ O~ O: X */
+/* D- N~ O` O' O^ O~ O: X */
48, 48, 48, 48, 48, 48, 48, 216,
/* O/ U` U' U^ U: Y' P B */
48, 48, 48, 48, 48, 48, 48, 48,
@@ -973,7 +997,7 @@
startSCol = startRCol = endCol;
endSRow = endRRow = startRow;
endSCol = endRCol = startCol;
- }
+ }
switch (selectUnit) {
case SELECTCHAR :
@@ -1156,12 +1180,12 @@
if ( row == crow ) j = Length(screen, crow, ccol, col);
else { /* two cases, cut is on same line, cut spans multiple lines */
j += Length(screen, crow, ccol, screen->max_col) + 1;
- for(i = crow + 1; i < row; i++)
+ for(i = crow + 1; i < row; i++)
j += Length(screen, i, 0, screen->max_col) + 1;
if (col >= 0)
j += Length(screen, row, 0, col);
}
-
+
/* now get some memory to save it in */
if (screen->selection_size <= j) {
@@ -1189,7 +1213,7 @@
lp = SaveText(screen, row, 0, col, lp, &eol);
}
*lp = '\0'; /* make sure we have end marked */
-
+
TRACE(("Salted TEXT:%.*s\n", lp - line, line))
screen->selection_length = (lp - line);
_OwnSelection(term, params, num_params);
@@ -1489,19 +1513,48 @@
return(lp);
}
+static int
+BtnCode(XButtonEvent *event, int button)
+{
+ if (button < 0 || button > 3)
+ button = 3;
+ return ' ' + (KeyState(event->state) << 2) + button;
+}
+
+#define MOUSE_LIMIT (255 - 32)
+
static void
EditorButton(register XButtonEvent *event)
{
- register TScreen *screen = &term->screen;
+ TScreen *screen = &term->screen;
int pty = screen->respond;
- char unsigned line[6];
- register unsigned row, col;
+ Char line[6];
+ int row, col;
int button, count = 0;
- button = event->button - 1;
+ /* If button event, get button # adjusted for DEC compatibility */
+ button = event->button - 1;
+ /* Compute character position of mouse pointer */
row = (event->y - screen->border) / FontHeight(screen);
col = (event->x - OriginX(screen)) / FontWidth(screen);
+
+ /* Limit to screen dimensions */
+ if (row < 0)
+ row = 0;
+ else if (row > screen->max_row)
+ row = screen->max_row;
+ else if (row > MOUSE_LIMIT)
+ row = MOUSE_LIMIT;
+
+ if (col < 0)
+ col = 0;
+ else if (col > screen->max_col)
+ col = screen->max_col;
+ else if (col > MOUSE_LIMIT)
+ col = MOUSE_LIMIT;
+
+ /* Build key sequence starting with \E[M */
if (screen->control_eight_bits) {
line[count++] = CSI;
} else {
@@ -1509,14 +1562,44 @@
line[count++] = '[';
}
line[count++] = 'M';
- if (screen->send_mouse_pos == 1) {
+
+ /* Add event code to key sequence */
+ if (screen->send_mouse_pos == X10_MOUSE) {
line[count++] = ' ' + button;
- } else {
- line[count++] = ' ' + (KeyState(event->state) << 2) +
- ((event->type == ButtonPress)? button:3);
}
+ else
+ {
+ /* Button-Motion events */
+ switch(event->type)
+ {
+ case ButtonPress:
+ line[count++] = BtnCode(event, screen->mouse_button = button);
+ break;
+ case ButtonRelease:
+ line[count++] = BtnCode(event, screen->mouse_button = -1);
+ break;
+ case MotionNotify:
+ /* BTN_EVENT_MOUSE and ANY_EVENT_MOUSE modes send motion
+ * events only if character cell has changed.
+ */
+ if ((row == screen->mouse_row)
+ && (col == screen->mouse_col))
+ return;
+ line[count++] = BtnCode(event, screen->mouse_button) + 32;
+ break;
+ default:
+ return;
+ }
+ }
+
+ screen->mouse_row = row;
+ screen->mouse_col = col;
+
+ /* Add pointer position to key sequence */
line[count++] = ' ' + col + 1;
line[count++] = ' ' + row + 1;
+
+ /* Transmit key sequence to process running under xterm */
v_write(pty, (char *)line, count);
}
Index: charproc.c
--- xterm-82+/charproc.c Sat Jul 18 13:11:26 1998
+++ xterm-83/charproc.c Mon Aug 24 22:05:17 1998
@@ -90,6 +90,7 @@
#include "menu.h"
#include "main.h"
#include "xterm.h"
+#include "xcharmouse.h"
#ifndef NO_ACTIVE_ICON
#include <X11/Shell.h>
@@ -111,7 +112,6 @@
#endif
extern jmp_buf VTend;
-extern XtermWidget term;
extern Widget toplevel;
extern char *ProgramName;
@@ -1406,7 +1406,7 @@
break;
case CASE_TRACK_MOUSE:
- if (screen->send_mouse_pos == 3
+ if (screen->send_mouse_pos == VT200_HIGHLIGHT_MOUSE
|| nparam > 1) {
/* Track mouse as long as in window and between
* specified rows
@@ -2691,6 +2691,9 @@
}
}
+#define set_mousemode(mode) \
+ screen->send_mouse_pos = (func == bitset) ? mode : MOUSE_OFF
+
/*
* process DEC private modes set, reset
*/
@@ -2764,11 +2767,8 @@
case 8: /* DECARM */
/* ignore autorepeat */
break;
- case 9: /* MIT bogus sequence */
- if(func == bitset)
- screen->send_mouse_pos = 1;
- else
- screen->send_mouse_pos = 0;
+ case SET_X10_MOUSE: /* MIT bogus sequence */
+ set_mousemode(X10_MOUSE);
break;
case 18: /* DECPFF: print form feed */
if(func == bitset)
@@ -2860,18 +2860,27 @@
(*func)(&termw->keyboard.flags, MODE_DECBKM);
update_decbkm();
break;
- case 1000: /* xterm bogus sequence */
- if(func == bitset)
- screen->send_mouse_pos = 2;
- else
- screen->send_mouse_pos = 0;
+ case SET_VT200_MOUSE: /* xterm bogus sequence */
+ set_mousemode(VT200_MOUSE);
break;
- case 1001: /* xterm sequence w/hilite tracking */
- if(func == bitset)
- screen->send_mouse_pos = 3;
- else
- screen->send_mouse_pos = 0;
+ case SET_VT200_HIGHLIGHT_MOUSE: /* xterm sequence w/hilite tracking */
+ set_mousemode(VT200_HIGHLIGHT_MOUSE);
+ break;
+ case SET_BTN_EVENT_MOUSE:
+ set_mousemode(BTN_EVENT_MOUSE);
break;
+ case SET_ANY_EVENT_MOUSE:
+ set_mousemode(ANY_EVENT_MOUSE);
+ if (screen->send_mouse_pos == MOUSE_OFF) {
+ screen->event_mask |= ButtonMotionMask;
+ screen->event_mask &= ~PointerMotionMask;
+ } else {
+ screen->event_mask &= ~ButtonMotionMask;
+ screen->event_mask |= PointerMotionMask;
+ }
+ XSelectInput(XtDisplay(termw), term->core.window, screen->event_mask);
+ break;
+
case 1048:
if (!termw->misc.titeInhibit) {
if(func == bitset)
@@ -2918,7 +2927,7 @@
case 8: /* DECARM */
/* ignore autorepeat */
break;
- case 9: /* mouse bogus sequence */
+ case SET_X10_MOUSE: /* mouse bogus sequence */
DoSM(DP_X_X10MSE, screen->send_mouse_pos);
break;
case 40: /* 132 column mode */
@@ -2939,11 +2948,14 @@
break;
#endif
case 1047: /* alternate buffer */
+ /* FALLTHRU */
case 47: /* alternate buffer */
DoSM(DP_X_ALTSCRN, screen->alternate);
break;
- case 1000: /* mouse bogus sequence */
- case 1001:
+ case SET_VT200_MOUSE: /* mouse bogus sequence */
+ case SET_VT200_HIGHLIGHT_MOUSE:
+ case SET_BTN_EVENT_MOUSE:
+ case SET_ANY_EVENT_MOUSE:
DoSM(DP_X_MOUSE, screen->send_mouse_pos);
break;
case 1048:
@@ -3013,7 +3025,7 @@
case 8: /* DECARM */
/* ignore autorepeat */
break;
- case 9: /* MIT bogus sequence */
+ case SET_X10_MOUSE: /* MIT bogus sequence */
DoRM(DP_X_X10MSE, screen->send_mouse_pos);
break;
case 40: /* 132 column mode */
@@ -3045,6 +3057,7 @@
break;
#endif
case 1047: /* alternate buffer */
+ /* FALLTHRU */
case 47: /* alternate buffer */
if (!termw->misc.titeInhibit) {
if(screen->save_modes[DP_X_ALTSCRN])
@@ -3054,8 +3067,10 @@
/* update_altscreen done by ToAlt and FromAlt */
}
break;
- case 1000: /* mouse bogus sequence */
- case 1001:
+ case SET_VT200_MOUSE: /* mouse bogus sequence */
+ case SET_VT200_HIGHLIGHT_MOUSE:
+ case SET_BTN_EVENT_MOUSE:
+ case SET_ANY_EVENT_MOUSE:
DoRM(DP_X_MOUSE, screen->send_mouse_pos);
break;
case 1048:
@@ -3673,6 +3688,10 @@
new->dft_background = MyWhitePixel(new->screen.display);
}
+ new->screen.mouse_button = -1;
+ new->screen.mouse_row = -1;
+ new->screen.mouse_col = -1;
+
new->screen.c132 = request->screen.c132;
new->screen.curses = request->screen.curses;
new->screen.hp_ll_bc = request->screen.hp_ll_bc;
@@ -4006,6 +4025,7 @@
/* since only one client is permitted to select for Button
* events, we have to let the window manager get 'em...
*/
+ screen->event_mask = values->event_mask;
values->event_mask &= ~(ButtonPressMask|ButtonReleaseMask);
values->border_pixel = term->misc.icon_border_pixel;
Index: configure
--- xterm-82+/configure Fri Jun 5 16:23:53 1998
+++ xterm-83/configure Mon Aug 24 21:57:35 1998
@@ -3529,17 +3529,65 @@
LIBS="$LIBS $X_EXTRA_LIBS"
+
+# Extract the first word of "xterm", so it can be a program name with args.
+set dummy xterm; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3537: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_XTERM_PATH'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$XTERM_PATH" in
+ /*)
+ ac_cv_path_XTERM_PATH="$XTERM_PATH" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_XTERM_PATH="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ ;;
+esac
+fi
+XTERM_PATH="$ac_cv_path_XTERM_PATH"
+if test -n "$XTERM_PATH"; then
+ echo "$ac_t""$XTERM_PATH" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+XTERM_MODE=755
+echo $ac_n "checking for existing installation-mode""... $ac_c" 1>&6
+echo "configure:3567: checking for existing installation-mode" >&5
+if test -f "$XTERM_PATH" ; then
+ ls -l $XTERM_PATH >conftest.out
+ read cf_mode cf_rest <conftest.out
+ case ".$cf_mode" in #(vi
+ .???s*)
+ XTERM_MODE=4711
+ ;;
+ esac
+fi
+echo "$ac_t""$XTERM_MODE" 1>&6
+
+
+
for ac_func in \
XkbStdBell \
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3538: checking for $ac_func" >&5
+echo "configure:3586: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3543 "configure"
+#line 3591 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3562,7 +3610,7 @@
; return 0; }
EOF
-if { (eval echo configure:3566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3588,7 +3636,7 @@
echo $ac_n "checking if we should use imake to help""... $ac_c" 1>&6
-echo "configure:3592: checking if we should use imake to help" >&5
+echo "configure:3640: checking if we should use imake to help" >&5
# Check whether --enable-imake or --disable-imake was given.
if test "${enable_imake+set}" = set; then
@@ -3613,7 +3661,7 @@
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3617: checking for $ac_word" >&5
+echo "configure:3665: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_IMAKE'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3747,7 +3795,7 @@
echo $ac_n "checking for default terminal-id""... $ac_c" 1>&6
-echo "configure:3751: checking for default terminal-id" >&5
+echo "configure:3799: checking for default terminal-id" >&5
# Check whether --with-terminal-id or --without-terminal-id was given.
if test "${with_terminal_id+set}" = set; then
@@ -3768,7 +3816,7 @@
echo $ac_n "checking for default terminal-type""... $ac_c" 1>&6
-echo "configure:3772: checking for default terminal-type" >&5
+echo "configure:3820: checking for default terminal-type" >&5
# Check whether --with-terminal-type or --without-terminal-type was given.
if test "${with_terminal_type+set}" = set; then
@@ -3785,7 +3833,7 @@
echo $ac_n "checking for private terminfo-directory""... $ac_c" 1>&6
-echo "configure:3789: checking for private terminfo-directory" >&5
+echo "configure:3837: checking for private terminfo-directory" >&5
# Check whether --with-own-terminfo or --without-own-terminfo was given.
if test "${with_own_terminfo+set}" = set; then
@@ -3810,7 +3858,7 @@
### checks for optional features
echo $ac_n "checking if you want active-icons""... $ac_c" 1>&6
-echo "configure:3814: checking if you want active-icons" >&5
+echo "configure:3862: checking if you want active-icons" >&5
# Check whether --enable-active-icon or --disable-active-icon was given.
if test "${enable_active_icon+set}" = set; then
@@ -3836,7 +3884,7 @@
fi
echo $ac_n "checking if you want ANSI color""... $ac_c" 1>&6
-echo "configure:3840: checking if you want ANSI color" >&5
+echo "configure:3888: checking if you want ANSI color" >&5
# Check whether --enable-ansi-color or --disable-ansi-color was given.
if test "${enable_ansi_color+set}" = set; then
@@ -3860,7 +3908,7 @@
echo $ac_n "checking if you want 16 colors like aixterm""... $ac_c" 1>&6
-echo "configure:3864: checking if you want 16 colors like aixterm" >&5
+echo "configure:3912: checking if you want 16 colors like aixterm" >&5
# Check whether --enable-16-color or --disable-16-color was given.
if test "${enable_16_color+set}" = set; then
@@ -3884,7 +3932,7 @@
echo $ac_n "checking if you want bold colors mapped like IBM PC""... $ac_c" 1>&6
-echo "configure:3888: checking if you want bold colors mapped like IBM PC" >&5
+echo "configure:3936: checking if you want bold colors mapped like IBM PC" >&5
# Check whether --enable-bold-color or --disable-bold-color was given.
if test "${enable_bold_color+set}" = set; then
@@ -3908,7 +3956,7 @@
echo $ac_n "checking if you want color-mode enabled by default""... $ac_c" 1>&6
-echo "configure:3912: checking if you want color-mode enabled by default" >&5
+echo "configure:3960: checking if you want color-mode enabled by default" >&5
# Check whether --enable-color-mode or --disable-color-mode was given.
if test "${enable_color_mode+set}" = set; then
@@ -3932,7 +3980,7 @@
echo $ac_n "checking if you want support for color highlighting""... $ac_c" 1>&6
-echo "configure:3936: checking if you want support for color highlighting" >&5
+echo "configure:3984: checking if you want support for color highlighting" >&5
# Check whether --enable-highlighting or --disable-highlighting was given.
if test "${enable_highlighting+set}" = set; then
@@ -3956,7 +4004,7 @@
echo $ac_n "checking if you want support for doublesize characters""... $ac_c" 1>&6
-echo "configure:3960: checking if you want support for doublesize characters" >&5
+echo "configure:4008: checking if you want support for doublesize characters" >&5
# Check whether --enable-doublechars or --disable-doublechars was given.
if test "${enable_doublechars+set}" = set; then
@@ -3980,7 +4028,7 @@
echo $ac_n "checking if you want support for input-method""... $ac_c" 1>&6
-echo "configure:3984: checking if you want support for input-method" >&5
+echo "configure:4032: checking if you want support for input-method" >&5
# Check whether --enable-input-method or --disable-input-method was given.
if test "${enable_input_method+set}" = set; then
@@ -4006,7 +4054,7 @@
fi
echo $ac_n "checking if you want support for internationalization""... $ac_c" 1>&6
-echo "configure:4010: checking if you want support for internationalization" >&5
+echo "configure:4058: checking if you want support for internationalization" >&5
# Check whether --enable-i18n or --disable-i18n was given.
if test "${enable_i18n+set}" = set; then
@@ -4032,7 +4080,7 @@
fi
echo $ac_n "checking if you want support for logging""... $ac_c" 1>&6
-echo "configure:4036: checking if you want support for logging" >&5
+echo "configure:4084: checking if you want support for logging" >&5
# Check whether --enable-logging or --disable-logging was given.
if test "${enable_logging+set}" = set; then
@@ -4056,7 +4104,7 @@
EOF
echo $ac_n "checking if you want to allow logging via a pipe""... $ac_c" 1>&6
-echo "configure:4060: checking if you want to allow logging via a pipe" >&5
+echo "configure:4108: checking if you want to allow logging via a pipe" >&5
# Check whether --enable-logfile-exec or --disable-logfile-exec was given.
if test "${enable_logfile_exec+set}" = set; then
@@ -4083,7 +4131,7 @@
fi
echo $ac_n "checking if you want support for right-scrollbar""... $ac_c" 1>&6
-echo "configure:4087: checking if you want support for right-scrollbar" >&5
+echo "configure:4135: checking if you want support for right-scrollbar" >&5
# Check whether --enable-rightbar or --disable-rightbar was given.
if test "${enable_rightbar+set}" = set; then
@@ -4109,7 +4157,7 @@
fi
echo $ac_n "checking if you want check for redundant name-change""... $ac_c" 1>&6
-echo "configure:4113: checking if you want check for redundant name-change" >&5
+echo "configure:4161: checking if you want check for redundant name-change" >&5
# Check whether --enable-samename or --disable-samename was given.
if test "${enable_samename+set}" = set; then
@@ -4133,7 +4181,7 @@
echo $ac_n "checking if you want support for tek4014""... $ac_c" 1>&6
-echo "configure:4137: checking if you want support for tek4014" >&5
+echo "configure:4185: checking if you want support for tek4014" >&5
# Check whether --enable-tek4014 or --disable-tek4014 was given.
if test "${enable_tek4014+set}" = set; then
@@ -4163,7 +4211,7 @@
fi
echo $ac_n "checking if you want VT52 emulation""... $ac_c" 1>&6
-echo "configure:4167: checking if you want VT52 emulation" >&5
+echo "configure:4215: checking if you want VT52 emulation" >&5
# Check whether --enable-vt52 or --disable-vt52 was given.
if test "${enable_vt52+set}" = set; then
@@ -4187,7 +4235,7 @@
echo $ac_n "checking if you want -ziconbeep option""... $ac_c" 1>&6
-echo "configure:4191: checking if you want -ziconbeep option" >&5
+echo "configure:4239: checking if you want -ziconbeep option" >&5
# Check whether --enable-ziconbeep or --disable-ziconbeep was given.
if test "${enable_ziconbeep+set}" = set; then
@@ -4212,7 +4260,7 @@
# development/testing aids
echo $ac_n "checking if you want debugging traces""... $ac_c" 1>&6
-echo "configure:4216: checking if you want debugging traces" >&5
+echo "configure:4264: checking if you want debugging traces" >&5
# Check whether --enable-trace or --disable-trace was given.
if test "${enable_trace+set}" = set; then
@@ -4241,7 +4289,7 @@
echo $ac_n "checking if you want to see long compiling messages""... $ac_c" 1>&6
-echo "configure:4245: checking if you want to see long compiling messages" >&5
+echo "configure:4293: checking if you want to see long compiling messages" >&5
# Check whether --enable-echo or --disable-echo was given.
if test "${enable_echo+set}" = set; then
@@ -4281,7 +4329,7 @@
echo $ac_n "checking if you want magic cookie emulation""... $ac_c" 1>&6
-echo "configure:4285: checking if you want magic cookie emulation" >&5
+echo "configure:4333: checking if you want magic cookie emulation" >&5
# Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
if test "${enable_xmc_glitch+set}" = set; then
@@ -4310,7 +4358,7 @@
if test -n "$GCC" ; then
echo $ac_n "checking if you want to turn on gcc warnings""... $ac_c" 1>&6
-echo "configure:4314: checking if you want to turn on gcc warnings" >&5
+echo "configure:4362: checking if you want to turn on gcc warnings" >&5
# Check whether --enable-warnings or --disable-warnings was given.
if test "${enable_warnings+set}" = set; then
@@ -4350,9 +4398,9 @@
if test -n "$GCC"
then
echo "checking for gcc __attribute__ directives" 1>&6
-echo "configure:4354: checking for gcc __attribute__ directives" >&5
+echo "configure:4402: checking for gcc __attribute__ directives" >&5
cat > conftest.$ac_ext <<EOF
-#line 4356 "configure"
+#line 4404 "configure"
#include "confdefs.h"
#include "conftest.h"
#include "conftest.i"
@@ -4390,7 +4438,7 @@
EOF
;;
esac
- if { (eval echo configure:4394: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ if { (eval echo configure:4442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
test -n "$verbose" && echo "$ac_t""... $cf_attribute" 1>&6
cat conftest.h >>confdefs.h
# else
@@ -4407,11 +4455,11 @@
if test -n "$GCC"
then
cat > conftest.$ac_ext <<EOF
-#line 4411 "configure"
+#line 4459 "configure"
int main(int argc, char *argv[]) { return argv[argc-1] == 0; }
EOF
echo "checking for gcc warning options" 1>&6
-echo "configure:4415: checking for gcc warning options" >&5
+echo "configure:4463: checking for gcc warning options" >&5
cf_save_CFLAGS="$CFLAGS"
EXTRA_CFLAGS="-W -Wall"
cf_warn_CONST=""
@@ -4429,7 +4477,7 @@
Wstrict-prototypes $cf_warn_CONST
do
CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
- if { (eval echo configure:4433: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ if { (eval echo configure:4481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
test "$cf_opt" = Wcast-qual && EXTRA_CFLAGS="$EXTRA_CFLAGS -DXTSTRINGDEFINES"
@@ -4593,6 +4641,8 @@
s%@X_PRE_LIBS@%$X_PRE_LIBS%g
s%@X_LIBS@%$X_LIBS%g
s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
+s%@XTERM_PATH@%$XTERM_PATH%g
+s%@XTERM_MODE@%$XTERM_MODE%g
s%@IMAKE@%$IMAKE%g
s%@IMAKE_CFLAGS@%$IMAKE_CFLAGS%g
s%@IMAKE_LOADFLAGS@%$IMAKE_LOADFLAGS%g
Index: configure.in
--- xterm-82+/configure.in Fri Jun 5 16:23:53 1998
+++ xterm-83/configure.in Mon Aug 24 21:54:27 1998
@@ -99,6 +99,8 @@
LIBS="$LIBS $X_EXTRA_LIBS"
+CF_XTERM_MODE
+
AC_CHECK_FUNCS( \
XkbStdBell \
)
Index: ctlseqs.ms
--- xterm-82+/ctlseqs.ms Fri Jun 5 16:23:53 1998
+++ xterm-83/ctlseqs.ms Mon Aug 24 21:25:16 1998
@@ -231,7 +231,7 @@
.AI
XFree86 Project (1996)
.AU
-
+.
.am BT \" add page numbers after first page
.ds CF %
..
@@ -279,13 +279,13 @@
Start of String (SOS: 0x98)
.IP \\*(Es\\*Z
Return Terminal ID (DECID: 0x9a). Obsolete form of \*(Cs\*c (DA).
-.IP \\*(Es\\*([[
+.IP \\*(Es\\*([[
Control Sequence Introducer (CSI: 0x9b)
.IP \\*(Es\\*(bS
String Terminator (ST: 0x9c)
-.IP \\*(Es\\*(]]
+.IP \\*(Es\\*(]]
Operating System Command (OSC: 0x9d)
-.IP \\*(Es\\*^
+.IP \\*(Es\\*^
Privacy Message (PM: 0x9e)
.IP \\*(Es\\*_
Application Program Command (APC: 0x9f)
@@ -735,23 +735,23 @@
\*(Ps = \*1 \(-> Restore (de-iconify) window.
\*(Ps = \*2 \(-> Minimize (iconify) window.
\*(Ps = \*3 ; \fIx ; y\fP \(-> Move window to [x, y].
- \*(Ps = \*4 ; \fIheight ; width\fP \(-> Resize the xterm window to height and width in pixels.
- \*(Ps = \*5 \(-> Raise the xterm window to the front of the stacking order.
- \*(Ps = \*6 \(-> Lower the xterm window to the bottom of the stacking order.
- \*(Ps = \*7 \(-> Refresh the xterm window.
+ \*(Ps = \*4 ; \fIheight ; width\fP \(-> Resize the \fIxterm\fP window to height and width in pixels.
+ \*(Ps = \*5 \(-> Raise the \fIxterm\fP window to the front of the stacking order.
+ \*(Ps = \*6 \(-> Lower the \fIxterm\fP window to the bottom of the stacking order.
+ \*(Ps = \*7 \(-> Refresh the \fIxterm\fP window.
\*(Ps = \*8 ; \fIheight ; width\fP \(-> Resize the text area to [height;width] in characters.
- \*(Ps = \*1\*1 \(-> Report xterm window state.
-If the xterm window is open (non-iconified), it returns \*(Cs\*1\*t.
-If the xterm window is iconified, it returns \*(Cs\*2\*t.
- \*(Ps = \*1\*3 \(-> Report xterm window position as
+ \*(Ps = \*1\*1 \(-> Report \fIxterm\fP window state.
+If the \fIxterm\fP window is open (non-iconified), it returns \*(Cs\*1\*t.
+If the \fIxterm\fP window is iconified, it returns \*(Cs\*2\*t.
+ \*(Ps = \*1\*3 \(-> Report \fIxterm\fP window position as
\*(Cs\*3\*;\*(Ix\*;\*(Iy\*t
- \*(Ps = \*1\*4 \(-> Report xterm window in pixels as
+ \*(Ps = \*1\*4 \(-> Report \fIxterm\fP window in pixels as
\*(Cs\*s\*4\*s\*;\*s\fIheight\fP\*s\*;\*s\fIwidth\fP\*s\*t
\*(Ps = \*1\*8 \(-> Report the size of the text area in characters as
\*(Cs\*s\*8\*s\*;\*s\fIheight\fP\*s\*;\*s\fIwidth\fP\*t
- \*(Ps = \*2\*0 \(-> Report xterm window's icon label as
+ \*(Ps = \*2\*0 \(-> Report \fIxterm\fP window's icon label as
\*(Os\*s\*L\*s\fIlabel\fP\*s\*(ST
- \*(Ps = \*2\*1 \(-> Report xterm window's title as
+ \*(Ps = \*2\*1 \(-> Report \fIxterm\fP window's title as
\*(Os\*s\*l\*s\fItitle\fP\*s\*(ST
\*(Ps >= \*2\*4 \(-> Resize to \*(Ps lines (DECSLPP)
.
@@ -788,7 +788,8 @@
\*(Ps = \*1\*0\*0\*0 \(-> Send Mouse X & Y on button press and release.
See the section \fBMouse Tracking\fP.
\*(Ps = \*1\*0\*0\*1 \(-> Use Hilite Mouse Tracking.
-See the section \fBMouse Tracking\fP.
+ \*(Ps = \*1\*0\*0\*2 \(-> Use Cell Motion Mouse Tracking.
+ \*(Ps = \*1\*0\*0\*3 \(-> Use All Motion Mouse Tracking.
\*(Ps = \*1\*0\*4\*7 \(-> Use Alternate Screen Buffer (unless
disabled by the \fBtiteInhibit\fP resource)
\*(Ps = \*1\*0\*4\*8 \(-> Save cursor as in DECSC (unless
@@ -818,8 +819,11 @@
\*(Ps = \*4\*7 \(-> Use Normal Screen Buffer
\*(Ps = \*6\*7 \(-> Backarrow key (DECBKM)
\*(Ps = \*1\*0\*0\*0 \(-> Don't Send Mouse X & Y on button press and
-release
+release.
+See the section \fBMouse Tracking\fP.
\*(Ps = \*1\*0\*0\*1 \(-> Don't Use Hilite Mouse Tracking
+ \*(Ps = \*1\*0\*0\*2 \(-> Don't Use Cell Motion Mouse Tracking
+ \*(Ps = \*1\*0\*0\*3 \(-> Don't Use All Motion Mouse Tracking
\*(Ps = \*1\*0\*4\*7 \(-> Use Normal Screen Buffer, clearing screen
first if in the Alternate Screen (unless
disabled by the \fBtiteInhibit\fP resource)
@@ -860,40 +864,70 @@
.
.Ed
.
+.
.SH
Mouse Tracking
+.ds RH Mouse Tracking
.LP
The VT widget can be set to send the mouse position and other
information on button presses. These modes are typically used by
editors and other full-screen applications that want to make use of
the mouse.
+.
+.LP
+There are five mutually exclusive modes, each enabled (or disabled)
+by a different parameter in the
+DECSET \*(Cs\*?\*(Pm\*s\*h
+or
+DECRST \*(Cs\*?\*(Pm\*s\*l
+control sequence.
+.
+.LP
+Manifest constants for the parameter values
+are defined in \fBxcharmouse.h\fP as follows:
+.
+.DS
+#define SET_X10_MOUSE 9
+#define SET_VT200_MOUSE 1000
+#define SET_VT200_HIGHLIGHT_MOUSE 1001
+#define SET_BTN_EVENT_MOUSE 1002
+#define SET_ANY_EVENT_MOUSE 1003
+.DE
.LP
-There are three mutually exclusive modes, each enabled (or disabled)
-by a different parameter in the DECSET (or DECRST) escape sequence.
-Parameters for all mouse tracking escape sequences generated by
-\fIxterm\fP encode numeric parameters in a single character as
-\fIvalue\fP+040. For example, \*! is 1. The screen
-coodinate system is 1-based.
+The motion reporting modes are strictly \fIxterm\fP extensions, and are not
+part of any standard, though they are analogous to the DEC VT200 DECELR
+locator reports.
.LP
-X10 compatibility mode sends an escape sequence on button press
+Parameters (such as pointer position and button number) for all mouse
+tracking escape sequences generated by \fIxterm\fP
+encode numeric parameters in a single character as
+\fIvalue\fP+32.
+For example, \*! specifies the value 1.
+The upper left character position on the terminal is denoted as 1,1.
+.
+.LP
+X10 compatibility mode sends an escape sequence only on button press,
encoding the location and the mouse button pressed.
It is enabled by specifying parameter 9 to DECSET.
On button press, \fIxterm\fP sends
-\*(Cs\*M\*(Cb\*(Cx\*(Cy (6 characters). \*(Cb is button\-1.
+\*(Cs\*M\*(Cb\*(Cx\*(Cy (6 characters).
+\*(Cb is button\-1.
\*(Cx and \*(Cy are the x and y coordinates of the mouse when the
button was pressed.
+.
.LP
Normal tracking mode sends an escape sequence on both button press and
-release. Modifier information is also sent.
+release. Modifier key (shift, ctrl, meta) information is also sent.
It is enabled by specifying parameter 1000 to DECSET.
On button press or release, \fIxterm\fP sends
\*(Cs\*M\*(Cb\*(Cx\*(Cy.
The low two bits of \*(Cb encode button information:
0=MB1 pressed, 1=MB2 pressed, 2=MB3 pressed, 3=release.
-The upper bits encode what modifiers were down when the button was
+The upper bits encode the modifiers which were down when the button was
pressed and are added together. 4=Shift, 8=Meta, 16=Control.
-\*(Cx and \*(Cy are the x and y coordinates of the mouse event. The
-upper left corner is (1,1).
+\*(Cx and \*(Cy are the x and y coordinates of the mouse event.
+The upper left corner is (1,1).
+.
.LP
Mouse hilite tracking notifies a program of a button press, receives a
range of lines from the program, highlights the region covered by
@@ -902,7 +936,7 @@
It is enabled by specifying parameter 1001 to DECSET.
Highlighting is performed only for button 1, though other button events
can be received.
-Warning: use of this mode requires a cooperating program or it will
+\fBWarning:\fP use of this mode requires a cooperating program or it will
hang \fIxterm.\fP
On button press, the same information as for normal tracking is
generated; \fIxterm\fP then waits for the program to send mouse
@@ -926,6 +960,30 @@
ending character positions of the region. \fImousex\fP and \fImousey\fP
give the location of the mouse at button up, which may not be over a
character.
+.
+.LP
+Button-event tracking is essentially the same as normal tracking, but
+\fIxterm\fP also reports button-motion events. Motion events
+are reported only if the mouse pointer has moved to a different character
+cell. It is enabled by specifying parameter 1002 to DECSET.
+On button press or release, \fIxterm\fP sends the same codes used by normal
+tracking mode. On button-motion events, \fIxterm\fP adds 4 to the event code
+(the third character, \*(Cb).
+The low two bits of the event code encode the button information.
+The third bit is set to indicate motion.
+Additional bits specify modifier keys as in normal mode.
+For example, motion into cell x,y with button 1
+down is reported as \*(Cs\*M\*@\*(Cx\*(Cy.
+( \*@ = 32 + 0 (button 1) + 32 (motion indicator) ).
+Similarly, motion with button 3
+down is reported as \*(Cs\*M\*(cB\*(Cx\*(Cy.
+( \*(cB = 32 + 2 (button 3) + 32 (motion indicator) ).
+.
+.LP
+Any-event mode is the same as button-event mode, except that all motion
+events are reported instead of just those that enter a new character cell.
+It is enabled by specifying 1003 to DECSET.
+.
.br
.ds RH Tektronix 4014 Mode
.SH
@@ -1032,7 +1090,7 @@
VT52 Mode
.LP
Parameters for cursor movement are at the end of the \*(Es\*Y escape sequence.
-Each ordinate is encoded in a single character as \fIvalue\fP+040.
+Each ordinate is encoded in a single character as \fIvalue\fP+32.
For example, \*! is 1.
The screen coodinate system is 0-based.
.St
Index: input.c
--- xterm-82+/input.c Sun Jul 5 16:05:39 1998
+++ xterm-83/input.c Tue Aug 25 05:14:19 1998
@@ -141,7 +141,8 @@
/* VT300 & up: backarrow toggle */
if ((nbytes == 1)
- && !(term->keyboard.flags & MODE_DECBKM)
+ && (((term->keyboard.flags & MODE_DECBKM) == 0)
+ ^ ((event->state & ControlMask) != 0))
&& (keysym == XK_BackSpace)) {
strbuf[0] = '\177';
}
@@ -229,7 +230,8 @@
/*
* Interpret F1-F4 as PF1-PF4 for VT52, VT100
*/
- else if (screen->old_fkeys == False
+ else if (!sunFunctionKeys
+ && screen->old_fkeys == False
&& (dec_code >= 11 && dec_code <= 14))
{
reply.a_type = SS3;
Index: main.c
--- xterm-82+/main.c Thu Aug 20 17:39:43 1998
+++ xterm-83/main.c Mon Aug 24 22:05:50 1998
@@ -1142,9 +1142,6 @@
};
Atom wm_delete_window;
-extern fd_set Select_mask;
-extern fd_set X_mask;
-extern fd_set pty_mask;
int
main (int argc, char *argv[])
Index: misc.c
--- xterm-82+/misc.c Fri Jun 5 16:23:53 1998
+++ xterm-83/misc.c Mon Aug 24 20:17:29 1998
@@ -48,6 +48,7 @@
#include <X11/Xmu/WinUtil.h>
#include "xterm.h"
+#include "xcharmouse.h"
#include "VTparse.h"
#include "data.h"
@@ -141,6 +142,12 @@
else
if(OUR_EVENT(event, LeaveNotify))
DoSpecialLeaveNotify (&event.xcrossing);
+ else if (screen->send_mouse_pos == ANY_EVENT_MOUSE
+ && event.xany.type == MotionNotify
+ && event.xcrossing.window == XtWindow(term)) {
+ SendMousePosition((Widget)term, &event);
+ continue;
+ }
if (!event.xany.send_event ||
screen->allowSendEvents ||
Index: ptyx.h
--- xterm-82+/ptyx.h Sat Jul 18 13:11:26 1998
+++ xterm-83/ptyx.h Mon Aug 24 20:35:52 1998
@@ -609,8 +609,12 @@
#endif
int border; /* inner border */
Cursor arrow; /* arrow cursor */
+ unsigned long event_mask;
unsigned short send_mouse_pos; /* user wants mouse transition */
/* and position information */
+ int mouse_button; /* current button pressed */
+ int mouse_row; /* ...and its row */
+ int mouse_col; /* ...and its column */
int select; /* xterm selected */
Boolean visualbell; /* visual bell mode */
Boolean allowSendEvents;/* SendEvent mode */
Index: screen.c
--- xterm-82+/screen.c Fri Jun 5 16:23:53 1998
+++ xterm-83/screen.c Mon Aug 24 06:09:17 1998
@@ -37,6 +37,7 @@
#include "error.h"
#include "data.h"
#include "xterm.h"
+#include "xcharmouse.h"
#include <stdio.h>
#include <signal.h>
@@ -643,7 +644,7 @@
* apparent).
*/
if (screen->highlight_selection
- && screen->send_mouse_pos != 3) {
+ && screen->send_mouse_pos != VT200_HIGHLIGHT_MOUSE) {
hi_col = screen->max_col;
while (hi_col > 0 && !(attrs[hi_col] & CHARDRAWN))
hi_col--;
Index: trace.c
--- xterm-82+/trace.c Fri Jun 5 16:23:53 1998
+++ xterm-83/trace.c Thu Aug 13 06:21:44 1998
@@ -48,7 +48,15 @@
Trace(char *fmt, ...)
{
static FILE *fp;
+ static char *trace_out;
va_list ap;
+
+ if (fp != 0
+ && trace_who != trace_out) {
+ fclose(fp);
+ fp = 0;
+ }
+ trace_out = trace_who;
if (!fp) {
char name[BUFSIZ];
Index: version.h
--- xterm-82+/version.h Sat Jul 18 13:11:26 1998
+++ xterm-83/version.h Sun Aug 23 20:53:30 1998
@@ -6,4 +6,4 @@
* version of xterm has been built. The number in parentheses is my patch
* number (T.Dickey).
*/
-#define XTERM_VERSION "XFree86 3.9Aj(82)"
+#define XTERM_VERSION "XFree86 3.9Nb(83)"
Index: xcharmouse.h
--- /dev/null Sun Jul 17 19:46:18 1994
+++ xterm-83/xcharmouse.h Mon Aug 24 21:25:07 1998
@@ -0,0 +1,56 @@
+/*
+ * $XFree86$
+ */
+
+/************************************************************
+
+Copyright 1998 by Jason Bacon <acadix@execpc.com>
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of the above listed
+copyright holder(s) not be used in advertising or publicity pertaining
+to distribution of the software without specific, written prior
+permission.
+
+THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD
+TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE
+LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+********************************************************/
+
+
+#ifndef included_xcharmouse_h
+#define included_xcharmouse_h
+
+/*
+ * Macros for dpmodes
+ * J. Bacon, acadix@execpc.com, June 1998
+ */
+
+/* DECSET arguments for turning on mouse reporting modes */
+#define SET_X10_MOUSE 9
+#define SET_VT200_MOUSE 1000
+#define SET_VT200_HIGHLIGHT_MOUSE 1001
+#define SET_BTN_EVENT_MOUSE 1002
+#define SET_ANY_EVENT_MOUSE 1003
+
+/* Values for screen->send_mouse_pos */
+enum {
+ MOUSE_OFF,
+ X10_MOUSE,
+ VT200_MOUSE,
+ VT200_HIGHLIGHT_MOUSE,
+ BTN_EVENT_MOUSE,
+ ANY_EVENT_MOUSE
+};
+
+#endif /* included_xcharmouse_h */
Index: xterm.log.html
--- xterm-82+/xterm.log.html Sat Jul 18 13:11:26 1998
+++ xterm-83/xterm.log.html Tue Aug 25 05:20:01 1998
@@ -41,6 +41,7 @@
xc/programs/Xserver/hw/xfree86).
<UL>
+<LI><A HREF="#xterm_83">Patch #83 - 1998/8/25 - XFree86 3.9Nb</A>
<LI><A HREF="#xterm_82">Patch #82 - 1998/7/15 - XFree86 3.9Aj</A>
<LI><A HREF="#xterm_81">Patch #81 - 1998/7/14 - XFree86 3.9Aj</A>
<LI><A HREF="#xterm_80">Patch #80 - 1998/6/29 - XFree86 3.9Ai</A>
@@ -124,6 +125,33 @@
<LI><A HREF="#xterm_02">Patch #2 - 1996/1/7</A>
<LI><A HREF="#xterm_01">Patch #1 - 1996/1/6</A>
</UL>
+
+<H1><A NAME="xterm_83">Patch #83 - 1998/8/25 - XFree86 3.9Nb</A></H1>
+Several small fixes and enhancements:
+<ul>
+ <li>add configure test to infer if xterm should be installed setuid
+ based on previously installed xterm (reported by Stephen Marley
+ and Stefan Dalibor).
+
+ <li>integrate/extend patch by Jason Bacon to implement quasi-continuous
+ mouse reporting.
+
+ <li>correct control sequences transmitted by function keys F1 to F4
+ when sunFunctionKeys resource is true (it was still using the
+ VT100 control sequences).
+
+ <li>modify handling of backarrow key so that the control modifier
+ toggles the backspace/delete interpretation set by the
+ backarrowKey resource.
+
+ <li>limit the row and column values used to report mouse position.
+</ul>
+
+From resync with XFree86 3.9Nb:
+<ul>
+ <li>add support for the VSTATUS control character (patch by
+ Robert Earl <rearl@teleport.com>).
+</ul>
<H1><A NAME="xterm_82">Patch #82 - 1998/7/15 - XFree86 3.9Aj</A></H1>
Bug fix for patch #81:
Index: xterm.man
--- xterm-82+/xterm.man Sun Jul 5 16:05:39 1998
+++ xterm-83/xterm.man Tue Aug 25 05:11:07 1998
@@ -134,11 +134,14 @@
\fIxterm\fP implements the window-manipulation control
sequences from \fIdtterm\fP, such as resizing the window, setting its location
on the screen.
+
.PP
.I Xterm
allows character-based applications to receive mouse events (currently
-button-press and release events only) as keyboard control sequences.
+button-press and release events, and button-motion events)
+as keyboard control sequences.
See \fIXterm Control Sequences\fP for details.
+
.SH OPTIONS
The \fIxterm\fP terminal emulator
accepts all of the standard X Toolkit command line options as well as
@@ -2074,5 +2077,6 @@
Jim Gettys (MIT-Athena), Bob Scheifler (MIT X Consortium), Doug Mink (SAO),
Steve Pitschke (Stellar), Ron Newman (MIT-Athena), Jim Fulton (MIT X
Consortium), Dave Serisky (HP), Jonathan Kamens (MIT-Athena),
-David Wexelblat and
+Jason Bacon <acadix@execpc.com>,
+David Wexelblat, and
Thomas Dickey (XFree86 Project).