v02i080: X11 Release 3, Patch4
Mike Wexler
mikew at wyse.wyse.com
Tue Jan 10 11:40:49 AEST 1989
Submitted-by: jim at expo.lcs.mit.edu (Jim Fulton)
Posting-number: Volume 2, Issue 80
Archive-name: x11.3/patch4
[Here is a corrected version of the patch. Don't apply the earlier
one. -mcw]
Created on Monday, 9 January 1989
[The original fix4 was created against the wrong revisions.]
This patch fixes problems in the following files:
clients/xterm/Imakefile add comment about -DWTMP and -DLASTLOG
clients/xterm/Tekproc.c fix menu action problems that abort xterm
clients/xterm/VTPrsTbl.c added support for DECID sequence ESC Z
clients/xterm/VTparse.def added support for DECID sequence ESC Z
clients/xterm/VTparse.h added support for DECID sequence ESC Z
clients/xterm/button.c fixed extend selection bugs and core dump
clients/xterm/charproc.c ESC Z and pointer escape sequences
clients/xterm/main.c utmp bug and optional WTMP and LASTLOG
clients/xterm/misc.c fix error message and cleanup
clients/xterm/screen.c fix resizing window with selection bug
clients/xterm/scrollbar.c fix incorrect use of do_not_propagate_mask
clients/xterm/xterm.man no longer using vtsingle or vtbold
Apply these fixes from the top of your X sources as follows:
% patch -p0 <fix4
*** /tmp/,RCSt1a26454 Mon Jan 9 11:19:44 1989
--- clients/xterm/Imakefile Mon Jan 9 11:19:44 1989
***************
*** 24,29 ****
--- 24,30 ----
#else
#define GettyProgram /* as nothing */
#endif
+ /* add -DWTMP and -DLASTLOG if you want them */
DEFINES = -DMODEMENU -DUTMP -DBcopy=bcopy GettyProgram
SRCS1 = button.c charproc.c cursor.c data.c input.c \
main.c menu.c misc.c screen.c scrollbar.c tabs.c \
*** /tmp/,RCSt1a26508 Mon Jan 9 11:19:57 1989
--- clients/xterm/Tekproc.c Mon Jan 9 11:19:59 1989
***************
*** 1,5 ****
/*
! * $XConsortium: Tekproc.c,v 1.44 88/11/16 13:45:06 rws Exp $
*
* Warning, there be crufty dragons here.
*/
--- 1,5 ----
/*
! * $XConsortium: Tekproc.c,v 1.47 89/01/04 12:01:34 jim Exp $
*
* Warning, there be crufty dragons here.
*/
***************
*** 121,127 ****
#define unput(c) *Tpushback++ = c
#ifndef lint
! static char rcs_id[] = "$XConsortium: Tekproc.c,v 1.44 88/11/16 13:45:06 rws Exp $";
#endif /* lint */
static XPoint *T_box[TEKNUMFONTS] = {
--- 121,127 ----
#define unput(c) *Tpushback++ = c
#ifndef lint
! static char rcs_id[] = "$XConsortium: Tekproc.c,v 1.47 89/01/04 12:01:34 jim Exp $";
#endif /* lint */
static XPoint *T_box[TEKNUMFONTS] = {
***************
*** 679,685 ****
register int border = 2 * screen->border;
register double d;
! XClearWindow(screen->display, TWindow(screen));
TWidth(screen) = w->core.width - border;
THeight(screen) = w->core.height - border;
TekScale(screen) = (double)TWidth(screen) / TEKWIDTH;
--- 679,685 ----
register int border = 2 * screen->border;
register double d;
! if (TWindow(screen)) XClearWindow(screen->display, TWindow(screen));
TWidth(screen) = w->core.width - border;
THeight(screen) = w->core.height - border;
TekScale(screen) = (double)TWidth(screen) / TEKWIDTH;
***************
*** 1166,1173 ****
if ((XValue&pr) || (YValue&pr))
sizehints.flags |= USSize|USPosition;
else sizehints.flags |= PSize|PPosition;
! tw->core.width = sizehints.width = width;
! tw->core.height = sizehints.height = height;
if ((WidthValue&pr) || (HeightValue&pr))
sizehints.flags |= USSize;
else sizehints.flags |= PSize;
--- 1166,1173 ----
if ((XValue&pr) || (YValue&pr))
sizehints.flags |= USSize|USPosition;
else sizehints.flags |= PSize|PPosition;
! sizehints.width = width;
! sizehints.height = height;
if ((WidthValue&pr) || (HeightValue&pr))
sizehints.flags |= USSize;
else sizehints.flags |= PSize;
***************
*** 1305,1310 ****
--- 1305,1311 ----
tek->count = 0;
tek->ptr = tek->data;
Tpushback = Tpushb;
+ Tbptr = Tbuffer;
screen->cur_X = 0;
screen->cur_Y = TEKHOME;
line_pt = Tline;
*** /tmp/,RCSt1a26543 Mon Jan 9 11:20:07 1989
--- clients/xterm/VTPrsTbl.c Mon Jan 9 11:20:08 1989
***************
*** 1,5 ****
/*
! * $XConsortium: VTPrsTbl.c,v 1.2 88/09/06 17:07:40 jim Exp $
*/
--- 1,5 ----
/*
! * $XConsortium: VTPrsTbl.c,v 1.3 89/01/04 13:37:41 jim Exp $
*/
***************
*** 29,41 ****
*/
#ifndef lint
! static char *rcsid_VTparsetable_c = "$XConsortium: VTPrsTbl.c,v 1.2 88/09/06 17:07:40 jim Exp $";
#endif /* lint */
#include "VTparse.h"
#ifndef lint
! static char rcs_id[] = "$XConsortium: VTPrsTbl.c,v 1.2 88/09/06 17:07:40 jim Exp $";
#endif /* lint */
/*
* Stupid Apollo C preprocessor can't handle long lines. So... To keep
* it happy, we put each onto a seperate line.... Sigh...
--- 29,42 ----
*/
#ifndef lint
! static char *rcsid_VTparsetable_c = "$XConsortium: VTPrsTbl.c,v 1.3 89/01/04 13:37:41 jim Exp $";
#endif /* lint */
#include "VTparse.h"
#ifndef lint
! static char rcs_id[] = "$XConsortium: VTPrsTbl.c,v 1.3 89/01/04 13:37:41 jim Exp $";
#endif /* lint */
+
/*
* Stupid Apollo C preprocessor can't handle long lines. So... To keep
* it happy, we put each onto a seperate line.... Sigh...
***************
*** 807,813 ****
/* X Y Z [ */
CASE_GROUND_STATE,
CASE_GROUND_STATE,
! CASE_GROUND_STATE,
CASE_CSI_STATE,
/* \ ] ^ _ */
CASE_GROUND_STATE,
--- 808,814 ----
/* X Y Z [ */
CASE_GROUND_STATE,
CASE_GROUND_STATE,
! CASE_DECID,
CASE_CSI_STATE,
/* \ ] ^ _ */
CASE_GROUND_STATE,
*** /tmp/,RCSt1a26559 Mon Jan 9 11:20:14 1989
--- clients/xterm/VTparse.def Mon Jan 9 11:20:15 1989
***************
*** 1,5 ****
#
! # $XConsortium: VTparse.def,v 1.2 88/09/06 14:35:13 jim Exp $
#
# List of symbols that need to be defined for VTparse.h. If you need to
# change any of the CASE_ macros, make the change here and rerun the command
--- 1,5 ----
#
! # $XConsortium: VTparse.def,v 1.3 89/01/04 13:37:48 jim Exp $
#
# List of symbols that need to be defined for VTparse.h. If you need to
# change any of the CASE_ macros, make the change here and rerun the command
***************
*** 73,75 ****
--- 73,76 ----
CASE_XTERM_SAVE
CASE_XTERM_RESTORE
CASE_XTERM_TITLE
+ CASE_DECID
*** /tmp/,RCSt1a26576 Mon Jan 9 11:20:17 1989
--- clients/xterm/VTparse.h Mon Jan 9 11:20:19 1989
***************
*** 1,5 ****
/*
! * $XConsortium: VTparse.h,v 1.3 88/09/06 17:07:45 jim Exp $
*/
--- 1,5 ----
/*
! * $XConsortium: VTparse.h,v 1.4 89/01/04 13:37:49 jim Exp $
*/
***************
*** 109,111 ****
--- 109,112 ----
#define CASE_XTERM_SAVE 64
#define CASE_XTERM_RESTORE 65
#define CASE_XTERM_TITLE 66
+ #define CASE_DECID 67
*** /tmp/,RCSt1a26604 Mon Jan 9 11:20:28 1989
--- clients/xterm/button.c Mon Jan 9 11:20:29 1989
***************
*** 1,5 ****
/*
! * $XConsortium: button.c,v 1.24 88/11/16 13:48:39 rws Exp $
*/
--- 1,5 ----
/*
! * $XConsortium: button.c,v 1.32 89/01/05 12:47:45 swick Exp $
*/
***************
*** 35,41 ****
J. Gettys.
*/
#ifndef lint
! static char rcs_id[] = "$XConsortium: button.c,v 1.24 88/11/16 13:48:39 rws Exp $";
#endif /* lint */
#include <X11/Xos.h>
#include <X11/Xlib.h>
--- 35,41 ----
J. Gettys.
*/
#ifndef lint
! static char rcs_id[] = "$XConsortium: button.c,v 1.32 89/01/05 12:47:45 swick Exp $";
#endif /* lint */
#include <X11/Xos.h>
#include <X11/Xlib.h>
***************
*** 130,143 ****
static int replyToEmacs;
! static Boolean SendMousePosition(w, event)
Widget w;
! XEvent* event; /* must be XButtonEvent* */
{
register TScreen *screen = &((XtermWidget)w)->screen;
if (screen->send_mouse_pos == 0) return False;
#define KeyModifiers \
(event->xbutton.state & (ShiftMask | LockMask | ControlMask | Mod1Mask | \
Mod2Mask | Mod3Mask | Mod4Mask | Mod5Mask ))
--- 130,146 ----
static int replyToEmacs;
! Boolean SendMousePosition(w, event)
Widget w;
! XEvent* event;
{
register TScreen *screen = &((XtermWidget)w)->screen;
if (screen->send_mouse_pos == 0) return False;
+ if (event->type != ButtonPress && event->type != ButtonRelease)
+ return False;
+
#define KeyModifiers \
(event->xbutton.state & (ShiftMask | LockMask | ControlMask | Mod1Mask | \
Mod2Mask | Mod3Mask | Mod4Mask | Mod5Mask ))
***************
*** 149,156 ****
switch (screen->send_mouse_pos) {
case 1: /* X10 compatibility sequences */
! if (event->type == ButtonPress && KeyModifiers == 0) {
! EditorButton(event);
return True;
}
return False;
--- 152,160 ----
switch (screen->send_mouse_pos) {
case 1: /* X10 compatibility sequences */
! if (KeyModifiers == 0) {
! if (event->type == ButtonPress)
! EditorButton(event);
return True;
}
return False;
***************
*** 196,206 ****
case RIGHTEXTENSION :
ExtendExtend(event->xmotion.x, event->xmotion.y);
break;
! default :
! /* Should get here rarely when everything
! fixed with windows and the event mgr */
! /* fprintf(stderr, "Race mouse motion\n");
! */ break;
}
}
--- 200,208 ----
case RIGHTEXTENSION :
ExtendExtend(event->xmotion.x, event->xmotion.y);
break;
! case NORMAL :
! /* will get here if send_mouse_pos != 0 */
! break;
}
}
***************
*** 344,349 ****
--- 346,352 ----
String *params; /* selections in precedence order */
Cardinal *num_params;
{
+ if (SendMousePosition(w, event)) return;
_GetSelection(w, event->xbutton.time, params, *num_params);
}
***************
*** 503,508 ****
--- 506,512 ----
TScreen *screen = &((XtermWidget)w)->screen;
int row, col, coord;
+ if (SendMousePosition(w, event)) return;
firstValidRow = 0;
lastValidRow = screen->max_row;
SetSelectUnit(event->xbutton.time, selectUnit);
***************
*** 576,595 ****
ScrollSelection(screen, amount)
register TScreen* screen;
! int amount;
{
/* Sent by scrollbar stuff, so amount never takes selection out of
saved text */
startRRow += amount; endRRow += amount;
startSRow += amount; endSRow += amount;
rawRow += amount;
screen->startHRow += amount;
screen->endHRow += amount;
}
! PointToRowCol(y, x, r, c)
register int y, x;
int *r, *c;
/* Convert pixel coordinates to character coordinates.
--- 580,656 ----
ScrollSelection(screen, amount)
register TScreen* screen;
! register int amount;
{
+ register int minrow = -screen->savedlines;
+
/* Sent by scrollbar stuff, so amount never takes selection out of
saved text */
+ /* XXX - the preceeding is false; cat /etc/termcap (or anything
+ larger than the number of saved lines plus the screen height) and then
+ hit extend select */
+
startRRow += amount; endRRow += amount;
startSRow += amount; endSRow += amount;
rawRow += amount;
screen->startHRow += amount;
screen->endHRow += amount;
+
+ if (startRRow < minrow) {
+ startRRow = minrow;
+ startRCol = 0;
+ }
+ if (endRRow < minrow) {
+ endRRow = minrow;
+ endRCol = 0;
+ }
+ if (startSRow < minrow) {
+ startSRow = minrow;
+ startSCol = 0;
+ }
+ if (endSRow < minrow) {
+ endSRow = minrow;
+ endSCol = 0;
+ }
+ if (rawRow < minrow) {
+ rawRow = minrow;
+ rawCol = 0;
+ }
+ if (screen->startHRow < minrow) {
+ screen->startHRow = minrow;
+ screen->startHCol = 0;
+ }
+ if (screen->endHRow < minrow) {
+ screen->endHRow = minrow;
+ screen->endHCol = 0;
+ }
+ screen->startHCoord = Coordinate (screen->startHRow, screen->startHCol);
+ screen->endHCoord = Coordinate (screen->endHRow, screen->endHCol);
}
! ResizeSelection (screen, rows, cols)
! TScreen *screen;
! int rows, cols;
! {
! rows--; /* decr to get 0-max */
! cols--;
!
! if (startRRow > rows) startRRow = rows;
! if (startSRow > rows) startSRow = rows;
! if (endRRow > rows) endRRow = rows;
! if (endSRow > rows) endSRow = rows;
! if (rawRow > rows) rawRow = rows;
!
! if (startRCol > cols) startRCol = cols;
! if (startSCol > cols) startSCol = cols;
! if (endRCol > cols) endRCol = cols;
! if (endSCol > cols) endSCol = cols;
! if (rawCol > cols) rawCol = cols;
! }
!
! static PointToRowCol(y, x, r, c)
register int y, x;
int *r, *c;
/* Convert pixel coordinates to character coordinates.
***************
*** 820,829 ****
register int i, j;
GC tempgc;
! if (frow < 0) frow = 0;
! if (trow < 0) trow = 0;
! if (frow > screen->max_row) frow = screen->max_row;
! if (trow > screen->max_row) trow = screen->max_row;
if (frow == trow && fcol == tcol)
return;
--- 881,897 ----
register int i, j;
GC tempgc;
! if (frow < 0)
! frow = fcol = 0;
! else if (frow > screen->max_row)
! return; /* nothing to do, since trow >= frow */
!
! if (trow < 0)
! return; /* nothing to do, since frow <= trow */
! else if (trow > screen->max_row) {
! trow = screen->max_row;
! tcol = screen->max_col+1;
! }
if (frow == trow && fcol == tcol)
return;
*** /tmp/,RCSt1a26628 Mon Jan 9 11:20:38 1989
--- clients/xterm/charproc.c Mon Jan 9 11:20:42 1989
***************
*** 1,5 ****
/*
! * $XConsortium: charproc.c,v 1.62 88/11/16 18:15:34 rws Exp $
*/
--- 1,5 ----
/*
! * $XConsortium: charproc.c,v 1.64 89/01/04 13:37:50 jim Exp $
*/
***************
*** 134,140 ****
#define doinput() (bcnt-- > 0 ? *bptr++ : in_put())
#ifndef lint
! static char rcs_id[] = "$XConsortium: charproc.c,v 1.62 88/11/16 18:15:34 rws Exp $";
#endif /* lint */
static long arg;
--- 134,140 ----
#define doinput() (bcnt-- > 0 ? *bptr++ : in_put())
#ifndef lint
! static char rcs_id[] = "$XConsortium: charproc.c,v 1.64 89/01/04 13:37:50 jim Exp $";
#endif /* lint */
static long arg;
***************
*** 646,651 ****
--- 646,654 ----
param[3]-1, param[4]-2);
break;
+ case CASE_DECID:
+ param[0] = -1; /* Default ID parameter */
+ /* Fall through into ... */
case CASE_DA1:
/* DA1 */
if (param[0] <= 0) { /* less than means DEFAULT */
***************
*** 2908,2912 ****
String *params; /* unused */
Cardinal *param_count; /* unused */
{
! /* do nothing */
}
--- 2911,2916 ----
String *params; /* unused */
Cardinal *param_count; /* unused */
{
! /* do nothing, but check for funny escape sequences */
! (void) SendMousePosition(w, event);
}
*** /tmp/,RCSt1a26798 Mon Jan 9 11:21:23 1989
--- clients/xterm/main.c Mon Jan 9 11:21:25 1989
***************
*** 1,5 ****
#ifndef lint
! static char rcs_id[] = "$XConsortium: main.c,v 1.97 88/11/07 11:16:34 jim Exp $";
#endif /* lint */
/*
--- 1,5 ----
#ifndef lint
! static char rcs_id[] = "$XConsortium: main.c,v 1.99 89/01/04 14:33:47 jim Exp $";
#endif /* lint */
/*
***************
*** 102,109 ****
--- 102,126 ----
#endif /* apollo */
#include <utmp.h>
+ #ifdef LASTLOG
+ #include <lastlog.h>
+ #endif
#include <sys/param.h> /* for NOFILE */
+ #ifndef UTMP_FILENAME
+ #define UTMP_FILENAME "/etc/utmp"
+ #endif
+ #ifndef LASTLOG_FILENAME
+ #define LASTLOG_FILENAME "/usr/adm/lastlog" /* only on BSD systems */
+ #endif
+ #ifndef WTMP_FILENAME
+ #if defined(SYSV) || defined(macII)
+ #define WTMP_FILENAME "/etc/wtmp"
+ #else
+ #define WTMP_FILENAME "/usr/adm/wtmp"
+ #endif
+ #endif
+
#include "ptyx.h"
#include "data.h"
#include "error.h"
***************
*** 220,226 ****
extern void endpwent();
extern struct passwd *fgetpwent();
#else /* not USE_SYSV_UTMP */
! static char etc_utmp[] = "/etc/utmp";
#endif /* USE_SYSV_UTMP */
static char *get_ty;
--- 237,249 ----
extern void endpwent();
extern struct passwd *fgetpwent();
#else /* not USE_SYSV_UTMP */
! static char etc_utmp[] = UTMP_FILENAME;
! #ifdef LASTLOG
! static char etc_lastlog[] = LASTLOG_FILENAME;
! #endif
! #ifdef WTMP
! static char etc_wtmp[] = WTMP_FILENAME;
! #endif
#endif /* USE_SYSV_UTMP */
static char *get_ty;
***************
*** 1130,1135 ****
--- 1153,1161 ----
struct passwd *pw = NULL;
#ifdef UTMP
struct utmp utmp;
+ #ifdef LASTLOG
+ struct lastlog lastlog;
+ #endif /* LASTLOG */
#endif /* UTMP */
extern int Exit();
char *getenv();
***************
*** 1704,1718 ****
(pw = getpwuid(screen->uid)) &&
(i = open(etc_utmp, O_WRONLY)) >= 0) {
bzero((char *)&utmp, sizeof(struct utmp));
! (void) strcpy(utmp.ut_line, ttydev + strlen("/dev/"));
! (void) strcpy(utmp.ut_name, pw->pw_name);
! (void) strcpy(utmp.ut_host,
! XDisplayString (screen->display));
time(&utmp.ut_time);
lseek(i, (long)(tslot * sizeof(struct utmp)), 0);
write(i, (char *)&utmp, sizeof(struct utmp));
added_utmp_entry = True;
close(i);
} else
tslot = -tslot;
}
--- 1730,1775 ----
(pw = getpwuid(screen->uid)) &&
(i = open(etc_utmp, O_WRONLY)) >= 0) {
bzero((char *)&utmp, sizeof(struct utmp));
! (void) strncpy(utmp.ut_line,
! ttydev + strlen("/dev/"),
! sizeof(utmp.ut_line));
! (void) strncpy(utmp.ut_name, pw->pw_name,
! sizeof(utmp.ut_name));
! (void) strncpy(utmp.ut_host,
! XDisplayString (screen->display),
! sizeof(utmp.ut_host));
time(&utmp.ut_time);
lseek(i, (long)(tslot * sizeof(struct utmp)), 0);
write(i, (char *)&utmp, sizeof(struct utmp));
+ close(i);
added_utmp_entry = True;
+ #ifdef WTMP
+ if (term->misc.login_shell &&
+ (i = open(etc_wtmp, O_WRONLY|O_APPEND)) >= 0) {
+ write(i, (char *)&utmp,
+ sizeof(struct utmp));
close(i);
+ }
+ #endif /* WTMP */
+ #ifdef LASTLOG
+ if (term->misc.login_shell &&
+ (i = open(etc_lastlog, O_WRONLY)) >= 0) {
+ bzero((char *)&lastlog,
+ sizeof (struct lastlog));
+ (void) strncpy(lastlog.ll_line, ttydev +
+ sizeof("/dev"),
+ sizeof (lastlog.ll_line));
+ (void) strncpy(lastlog.ll_host,
+ XDisplayString (screen->display),
+ sizeof (lastlog.ll_host));
+ time(&lastlog.ll_time);
+ lseek(i, (long)(screen->uid *
+ sizeof (struct lastlog)), 0);
+ write(i, (char *)&lastlog,
+ sizeof (struct lastlog));
+ close(i);
+ }
+ #endif /* LASTLOG */
} else
tslot = -tslot;
}
***************
*** 2020,2025 ****
--- 2077,2092 ----
lseek(i, (long)(tslot * sizeof(struct utmp)), 0);
write(i, (char *)&utmp, sizeof(struct utmp));
close(i);
+ #ifdef WTMP
+ if (term->misc.login_shell &&
+ (i = open(etc_wtmp, O_WRONLY | O_APPEND)) >= 0) {
+ (void) strncpy(utmp.ut_line, ttydev +
+ sizeof("/dev"), sizeof (utmp.ut_line));
+ time(&utmp.ut_time);
+ write(i, (char *)&utmp, sizeof(struct utmp));
+ close(i);
+ }
+ #endif /* WTMP */
}
#endif /* USE_SYSV_UTMP */
#endif /* UTMP */
*** /tmp/,RCSt1a26856 Mon Jan 9 11:21:40 1989
--- clients/xterm/misc.c Mon Jan 9 11:21:40 1989
***************
*** 1,5 ****
/*
! * $XConsortium: misc.c,v 1.28 88/11/17 16:07:46 rws Exp $
*/
--- 1,5 ----
/*
! * $XConsortium: misc.c,v 1.29 89/01/04 12:25:17 jim Exp $
*/
***************
*** 45,50 ****
--- 45,51 ----
#include "wait.ic"
#include "waitmask.ic"
#include <X11/Shell.h>
+ #include <X11/Xmu.h>
extern char *malloc();
extern char *mktemp();
***************
*** 53,59 ****
extern void abort();
#ifndef lint
! static char rcs_id[] = "$XConsortium: misc.c,v 1.28 88/11/17 16:07:46 rws Exp $";
#endif /* lint */
xevents()
--- 54,60 ----
extern void abort();
#ifndef lint
! static char rcs_id[] = "$XConsortium: misc.c,v 1.29 89/01/04 12:25:17 jim Exp $";
#endif /* lint */
xevents()
***************
*** 880,893 ****
Display *d;
register XErrorEvent *ev;
{
! char buffer[BUFSIZ];
! XGetErrorText(d, ev->error_code, buffer, BUFSIZ);
! fprintf(stderr, "%s: %s\n", xterm_name, buffer);
! fprintf(stderr, "Request code %d, minor code %d, serial #%ld, resource id %ld\n",
! ev->request_code, ev->minor_code, ev->serial, (long)ev->resourceid);
! _cleanup();
! abort();
! /* Exit(ERROR_XERROR); */
}
/*ARGSUSED*/
--- 881,889 ----
Display *d;
register XErrorEvent *ev;
{
! fprintf (stderr, "%s: warning, error event receieved:\n", xterm_name);
! (void) XmuPrintDefaultErrorMessage (d, ev, stderr);
! Exit (ERROR_XERROR);
}
/*ARGSUSED*/
*** /tmp/,RCSt1a26917 Mon Jan 9 11:21:51 1989
--- clients/xterm/screen.c Mon Jan 9 11:21:52 1989
***************
*** 1,5 ****
/*
! * $XConsortium: screen.c,v 1.8 88/10/07 08:18:41 swick Exp $
*/
#include <X11/copyright.h>
--- 1,5 ----
/*
! * $XConsortium: screen.c,v 1.10 89/01/03 16:18:06 jim Exp $
*/
#include <X11/copyright.h>
***************
*** 30,36 ****
/* screen.c */
#ifndef lint
! static char rcs_id[] = "$XConsortium: screen.c,v 1.8 88/10/07 08:18:41 swick Exp $";
#endif /* lint */
#include <X11/Xlib.h>
--- 30,36 ----
/* screen.c */
#ifndef lint
! static char rcs_id[] = "$XConsortium: screen.c,v 1.10 89/01/03 16:18:06 jim Exp $";
#endif /* lint */
#include <X11/Xlib.h>
***************
*** 382,395 ****
int width, height;
unsigned *flags;
{
! register int rows, cols;
register int index;
! register int savelines;
register ScrnBuf sb = screen->allbuf;
register ScrnBuf ab = screen->altbuf;
register int x;
! register int border = 2 * screen->border;
! register int i, j, k;
#ifdef sun
#ifdef TIOCSSIZE
struct ttysize ts;
--- 382,395 ----
int width, height;
unsigned *flags;
{
! int rows, cols;
register int index;
! int savelines;
register ScrnBuf sb = screen->allbuf;
register ScrnBuf ab = screen->altbuf;
register int x;
! int border = 2 * screen->border;
! int i, j, k;
#ifdef sun
#ifdef TIOCSSIZE
struct ttysize ts;
***************
*** 526,531 ****
--- 526,532 ----
screen->fullVwin.fullheight = height;
screen->fullVwin.fullwidth = width;
+ ResizeSelection (screen, rows, cols);
#ifdef sun
#ifdef TIOCSSIZE
/* Set tty's idea of window size */
*** /tmp/,RCSt1a26927 Mon Jan 9 11:21:55 1989
--- clients/xterm/scrollbar.c Mon Jan 9 11:21:56 1989
***************
*** 1,5 ****
/*
! * $XConsortium: scrollbar.c,v 1.16 88/10/07 08:19:51 swick Exp $
*/
#include <X11/copyright.h>
--- 1,5 ----
/*
! * $XConsortium: scrollbar.c,v 1.17 88/11/23 13:56:05 rws Exp $
*/
#include <X11/copyright.h>
***************
*** 42,48 ****
extern void Bcopy();
#ifndef lint
! static char rcs_id[] = "$XConsortium: scrollbar.c,v 1.16 88/10/07 08:19:51 swick Exp $";
#endif /* lint */
/* Event handlers */
--- 42,48 ----
extern void Bcopy();
#ifndef lint
! static char rcs_id[] = "$XConsortium: scrollbar.c,v 1.17 88/11/23 13:56:05 rws Exp $";
#endif /* lint */
/* Event handlers */
***************
*** 179,195 ****
Widget sbw;
TScreen *screen;
{
- XSetWindowAttributes attr;
-
XtRealizeWidget (sbw);
-
- attr.do_not_propagate_mask =
- LeaveWindowMask | EnterWindowMask | StructureNotifyMask;
-
- XChangeWindowAttributes(screen->display, XtWindow(sbw),
- CWDontPropagate, &attr);
-
- return;
}
--- 179,185 ----
*** /tmp/,RCSt1a27006 Mon Jan 9 11:22:12 1989
--- clients/xterm/xterm.man Mon Jan 9 11:22:15 1989
***************
*** 337,343 ****
.TP 8
.B \-fn \fIfont\fP
This option specifies the font to be used for displaying normal text. The
! default is ``vtsingle.''
.TP 8
.B \-name \fIname\fP
This option specifies the application name under which resources are to be
--- 337,343 ----
.TP 8
.B \-fn \fIfont\fP
This option specifies the font to be used for displaying normal text. The
! default is \fIfixed\fP.
.TP 8
.B \-name \fIname\fP
This option specifies the application name under which resources are to be
***************
*** 410,417 ****
Specifies whether or not synthetic key and button events (generated using
the X protocol SendEvent request) should be interpreted or discarded.
The default is ``false'' meaning they are discarded. Note that allowing
! such events creates a very large security hole (imagine someone sending
! your idle shell the key events for ``rm -fr *'').
.sp
.TP 8
.B "alwaysHighlight (\fPclass\fB AlwaysHighlight)"
--- 410,416 ----
Specifies whether or not synthetic key and button events (generated using
the X protocol SendEvent request) should be interpreted or discarded.
The default is ``false'' meaning they are discarded. Note that allowing
! such events creates a very large security hole.
.sp
.TP 8
.B "alwaysHighlight (\fPclass\fB AlwaysHighlight)"
***************
*** 818,823 ****
--- 817,830 ----
correctly (in the new colors), to minimize the probability of
spoofing. You can also bring up the menu again and make sure that a check
mark appears next to the entry.
+ .PP
+ \fBSecure Keyboard\fP mode will be disabled automatically if your xterm
+ window becomes iconified (or otherwise unmapped), or if you start up
+ a reparenting window manager (that places a title bar or other decoration
+ around the window) while in \fBSecure Keyboard\fP mode. (This is a
+ feature of the X protocol not easily overcome.) When this happens,
+ the foreground and background colors will be switched back and the bell
+ will sound in warning.
.SH "CHARACTER CLASSES"
Clicking the middle mouse button twice in rapid succession will cause all
characters of the same class (e.g. letters, white space, punctuation) to be
--
Mike Wexler(wyse!mikew) Phone: (408)433-1000 x1330
Moderator of comp.sources.x
More information about the Comp.sources.x
mailing list