[comp.windows.x] Updates to twm, part 2 of 2

tlastran@esunix.UUCP (Tom LaStrange) (04/29/88)

#! /bin/sh
# This is a shell archive, meaning:
# 1.  Remove everything above the #! /bin/sh line.
# 2.  Save the resulting test in a file
# 3.  Execute the file with /bin/sh (not csh) to create the files:
#
#twm.patches2
#
# Created by tlastran (Tom LaStrange) on Fri Apr 29 07:35:28 MDT 1988
#
if test -f 'twm.patches2'
then
    echo shar: will not over-write existing file "twm.patches2"
else
echo extracting "twm.patches2"
sed 's/^X//' >twm.patches2 <<'SHAR_EOF'
X*** gram.y	Fri Apr 29 07:23:40 1988
X--- ../gram.y	Fri Apr 29 06:45:35 1988
X***************
X*** 25,31 ****
X  
X  /***********************************************************************
X   *
X!  * $Header: gram.y,v 1.15 88/04/15 07:09:34 tlastran Exp $
X   *
X   * .twmrc command grammer
X   *
X--- 25,31 ----
X  
X  /***********************************************************************
X   *
X!  * $Header: gram.y,v 1.19 88/04/29 06:24:00 tlastran Exp $
X   *
X   * .twmrc command grammer
X   *
X***************
X*** 35,41 ****
X  
X  %{
X  static char RCSinfo[]=
X! "$Header: gram.y,v 1.15 88/04/15 07:09:34 tlastran Exp $";
X  
X  #include <stdio.h>
X  #include "twm.h"
X--- 35,41 ----
X  
X  %{
X  static char RCSinfo[]=
X! "$Header: gram.y,v 1.19 88/04/29 06:24:00 tlastran Exp $";
X  
X  #include <stdio.h>
X  #include "twm.h"
X***************
X*** 62,71 ****
X  };
X  
X  %token <num> LB RB MENUS MENU BUTTON TBUTTON
X! %token <num> F_MENU F_FOCUS F_REFRESH F_FILE F_TWMRC F_CIRCLEUP F_QUIT
X  %token <num> F_NOP F_TITLE F_VERSION F_EXEC F_CUT F_CIRCLEDOWN F_SOURCE
X! %token <num> F_CUTFILE
X! %token <num> T_NOP T_RAISE T_LOWER T_MOVE
X  %token <num> WARPCURSOR NUMBER BORDERWIDTH TITLE_FONT REVERSE_VIDEO
X  %token <num> RESIZE_FONT NO_TITLE AUTO_RAISE
X  %token <num> MENU_FONT ICON_FONT UNKNOWN_ICON
X--- 62,71 ----
X  };
X  
X  %token <num> LB RB MENUS MENU BUTTON TBUTTON
X! %token <num> F_MENU F_UNFOCUS F_REFRESH F_FILE F_TWMRC F_CIRCLEUP F_QUIT
X  %token <num> F_NOP F_TITLE F_VERSION F_EXEC F_CUT F_CIRCLEDOWN F_SOURCE
X! %token <num> F_CUTFILE F_MOVE F_ICONIFY F_FOCUS F_RESIZE F_RAISE F_LOWER
X! %token <num> T_NOP T_RAISE T_LOWER T_MOVE F_DESTROY
X  %token <num> WARPCURSOR NUMBER BORDERWIDTH TITLE_FONT REVERSE_VIDEO
X  %token <num> RESIZE_FONT NO_TITLE AUTO_RAISE
X  %token <num> MENU_FONT ICON_FONT UNKNOWN_ICON
X***************
X*** 151,156 ****
X--- 151,163 ----
X  		| F_FOCUS		{ $$ = F_FOCUS; }
X  		| F_REFRESH		{ $$ = F_REFRESH; }
X  		| F_SOURCE string	{ Action = $2; $$ = F_TWMRC; }
X+ 		| F_MOVE		{ $$ = F_MOVE; }
X+ 		| F_ICONIFY		{ $$ = F_ICONIFY; }
X+ 		| F_UNFOCUS		{ $$ = F_UNFOCUS; }
X+ 		| F_RESIZE		{ $$ = F_RESIZE; }
X+ 		| F_RAISE		{ $$ = F_RAISE; }
X+ 		| F_LOWER		{ $$ = F_LOWER; }
X+ 		| F_DESTROY		{ $$ = F_DESTROY; }
X  		| F_TWMRC		{ $$ = F_TWMRC; }
X  		| F_VERSION		{ $$ = F_VERSION; }
X  		| F_TITLE		{ $$ = F_TITLE; }
X*** menus.h	Fri Apr 29 07:23:55 1988
X--- ../menus.h	Tue Apr 26 08:03:55 1988
X***************
X*** 25,31 ****
X  
X  /***********************************************************************
X   *
X!  * $Header: menus.h,v 1.7 88/04/15 07:09:56 tlastran Exp $
X   *
X   * twm menus include file
X   *
X--- 25,31 ----
X  
X  /***********************************************************************
X   *
X!  * $Header: menus.h,v 1.9 88/04/26 08:03:08 tlastran Exp $
X   *
X   * twm menus include file
X   *
X***************
X*** 71,76 ****
X--- 71,77 ----
X      int active;			/* this menu is active */
X  } MenuRoot;
X  
X+ extern int RootFunction;
X  extern MenuRoot *Menu[];
X  extern MenuItem *Item[];
X  extern MenuRoot *MenuList;
XNo differences encountered
X*** version.h	Fri Apr 29 07:23:59 1988
X--- ../version.h	Tue Apr 26 08:04:57 1988
X***************
X*** 25,31 ****
X  
X  /**********************************************************************
X   *
X!  * $Header: version.h,v 1.2 88/04/15 07:10:11 tlastran Exp $
X   *
X   * TWM version externs
X   *
X--- 25,31 ----
X  
X  /**********************************************************************
X   *
X!  * $Header: version.h,v 1.3 88/04/26 08:03:19 tlastran Exp $
X   *
X   * TWM version externs
X   *
X*** events.c	Fri Apr 29 07:23:48 1988
X--- ../events.c	Fri Apr 29 06:26:20 1988
X***************
X*** 25,31 ****
X  
X  /***********************************************************************
X   *
X!  * $Header: events.c,v 1.31 88/04/15 07:09:47 tlastran Exp $
X   *
X   * twm event handling
X   *
X--- 25,31 ----
X  
X  /***********************************************************************
X   *
X!  * $Header: events.c,v 1.36 88/04/29 06:24:07 tlastran Exp $
X   *
X   * twm event handling
X   *
X***************
X*** 35,41 ****
X  
X  #ifndef lint
X  static char RCSinfo[]=
X! "$Header: events.c,v 1.31 88/04/15 07:09:47 tlastran Exp $";
X  #endif
X  
X  #include <stdio.h>
X--- 35,41 ----
X  
X  #ifndef lint
X  static char RCSinfo[]=
X! "$Header: events.c,v 1.36 88/04/29 06:24:07 tlastran Exp $";
X  #endif
X  
X  #include <stdio.h>
X***************
X*** 48,54 ****
X  
X  #include "twm.bm"
X  
X! static event_proc EventHandler[LASTEvent]; /* event handler jump table */
X  static XEvent event;		/* the current event */
X  static TwmWindow *tmp_win;	/* the current twm window */
X  static Window w;		/* the window that caused the event */
X--- 48,54 ----
X  
X  #include "twm.bm"
X  
X! event_proc EventHandler[LASTEvent]; /* event handler jump table */
X  static XEvent event;		/* the current event */
X  static TwmWindow *tmp_win;	/* the current twm window */
X  static Window w;		/* the window that caused the event */
X***************
X*** 66,76 ****
X  #define MOVE_VERT	1
X  #define MOVE_HORIZ	2
X  
X! static Window DragWindow;	/* variables used in moving windows */
X! static int DragX;
X! static int DragY;
X! static int DragWidth;
X! static int DragHeight;
X  static int enter_flag;
X  
X  
X--- 66,76 ----
X  #define MOVE_VERT	1
X  #define MOVE_HORIZ	2
X  
X! Window DragWindow;		/* variables used in moving windows */
X! int DragX;
X! int DragY;
X! int DragWidth;
X! int DragHeight;
X  static int enter_flag;
X  
X  
X***************
X*** 119,126 ****
X  void
X  HandleEvents()
X  {
X-     InitEvents();
X- 
X      while (TRUE)
X      {
X  	XNextEvent(dpy, &event);
X--- 119,124 ----
X***************
X*** 250,256 ****
X--- 248,256 ----
X      XDeleteContext(dpy, tmp_win->iconify_w, TwmContext);
X      XDeleteContext(dpy, tmp_win->resize_w, TwmContext);
X      XDeleteContext(dpy, tmp_win->icon_w, TwmContext);
X+ #ifndef NOFOCUS
X      XDeleteContext(dpy, tmp_win->focus_w, TwmContext);
X+ #endif
X      XDeleteContext(dpy, tmp_win->hilite_w, TwmContext);
X  
X      XDestroyWindow(dpy, tmp_win->frame);
X***************
X*** 296,302 ****
X  		case NormalState:
X  		case ZoomState:
X  		case InactiveState:
X! 		    XMapWindow(dpy, event.xmaprequest.window);
X  		    XMapRaised(dpy, tmp_win->frame);
X  		    break;
X  
X--- 296,302 ----
X  		case NormalState:
X  		case ZoomState:
X  		case InactiveState:
X! 		    XMapWindow(dpy, tmp_win->w);
X  		    XMapRaised(dpy, tmp_win->frame);
X  		    break;
X  
X***************
X*** 326,332 ****
X  	{
X  	    if (!tmp_win->icon)
X  	    {
X! 		XMapWindow(dpy, event.xmaprequest.window);
X  		XMapRaised(dpy, tmp_win->frame);
X  	    }
X  	}
X--- 326,332 ----
X  	{
X  	    if (!tmp_win->icon)
X  	    {
X! 		XMapWindow(dpy, tmp_win->w);
X  		XMapRaised(dpy, tmp_win->frame);
X  	    }
X  	}
X***************
X*** 408,425 ****
X      fprintf(stderr, "MotionNotify\n");
X      */
X  #endif
X-     /*XUnmapWindow(dpy, VersionWindow);*/
X      if (ConstMove)
X      {
X  	switch (ConstMoveDir)
X  	{
X  	    case MOVE_NONE:
X! 		if (event.xbutton.x_root < ConstMoveXL ||
X! 		    event.xbutton.x_root > ConstMoveXR)
X  		    ConstMoveDir = MOVE_HORIZ;
X  
X! 		if (event.xbutton.y_root < ConstMoveYT ||
X! 		    event.xbutton.y_root > ConstMoveYB)
X  		    ConstMoveDir = MOVE_VERT;
X  
X  		XQueryPointer(dpy, DragWindow, &JunkRoot, &JunkChild,
X--- 408,424 ----
X      fprintf(stderr, "MotionNotify\n");
X      */
X  #endif
X      if (ConstMove)
X      {
X  	switch (ConstMoveDir)
X  	{
X  	    case MOVE_NONE:
X! 		if (event.xmotion.x_root < ConstMoveXL ||
X! 		    event.xmotion.x_root > ConstMoveXR)
X  		    ConstMoveDir = MOVE_HORIZ;
X  
X! 		if (event.xmotion.y_root < ConstMoveYT ||
X! 		    event.xmotion.y_root > ConstMoveYB)
X  		    ConstMoveDir = MOVE_VERT;
X  
X  		XQueryPointer(dpy, DragWindow, &JunkRoot, &JunkChild,
X***************
X*** 427,443 ****
X  		break;
X  
X  	    case MOVE_VERT:
X! 		ConstMoveY = event.xbutton.y_root - DragY - BorderWidth;
X  		break;
X  
X  	    case MOVE_HORIZ:
X! 		ConstMoveX= event.xbutton.x_root - DragX - BorderWidth;
X  		break;
X  	}
X  
X  	if (ConstMoveDir != MOVE_NONE)
X  	{
X! 	    MoveOutline(event.xbutton.root,
X  		ConstMoveX, ConstMoveY,
X  		DragWidth + 2 * BorderWidth,
X  		DragHeight + 2 * BorderWidth);
X--- 426,442 ----
X  		break;
X  
X  	    case MOVE_VERT:
X! 		ConstMoveY = event.xmotion.y_root - DragY - BorderWidth;
X  		break;
X  
X  	    case MOVE_HORIZ:
X! 		ConstMoveX= event.xmotion.x_root - DragX - BorderWidth;
X  		break;
X  	}
X  
X  	if (ConstMoveDir != MOVE_NONE)
X  	{
X! 	    MoveOutline(event.xmotion.root,
X  		ConstMoveX, ConstMoveY,
X  		DragWidth + 2 * BorderWidth,
X  		DragHeight + 2 * BorderWidth);
X***************
X*** 447,455 ****
X  
X      if (DragWindow != NULL)
X      {
X! 	MoveOutline(event.xbutton.root,
X! 	    event.xbutton.x_root - DragX - BorderWidth,
X! 	    event.xbutton.y_root - DragY - BorderWidth,
X  	    DragWidth + 2 * BorderWidth,
X  	    DragHeight + 2 * BorderWidth);
X  
X--- 446,454 ----
X  
X      if (DragWindow != NULL)
X      {
X! 	MoveOutline(event.xmotion.root,
X! 	    event.xmotion.x_root - DragX - BorderWidth,
X! 	    event.xmotion.y_root - DragY - BorderWidth,
X  	    DragWidth + 2 * BorderWidth,
X  	    DragHeight + 2 * BorderWidth);
X  
X***************
X*** 477,486 ****
X  #ifdef DEBUG
X      fprintf(stderr, "ButtonRelease\n");
X  #endif
X!     XUngrabPointer(dpy, CurrentTime);
X!     XUngrabServer(dpy);
X!     EventHandler[EnterNotify] = HandleEnterNotify;
X!     EventHandler[LeaveNotify] = HandleLeaveNotify;
X  
X      if (DragWindow != NULL)
X      {
X--- 476,488 ----
X  #ifdef DEBUG
X      fprintf(stderr, "ButtonRelease\n");
X  #endif
X!     if (RootFunction == NULL)
X!     {
X! 	XUngrabPointer(dpy, CurrentTime);
X! 	XUngrabServer(dpy);
X! 	EventHandler[EnterNotify] = HandleEnterNotify;
X! 	EventHandler[LeaveNotify] = HandleLeaveNotify;
X!     }
X  
X      if (DragWindow != NULL)
X      {
X***************
X*** 533,538 ****
X--- 535,543 ----
X  	EndResize();
X  	EventHandler[EnterNotify] = HandleEnterNotify;
X  	EventHandler[LeaveNotify] = HandleLeaveNotify;
X+ 	XUngrabPointer(dpy, CurrentTime);
X+ 	XUngrabServer(dpy);
X+ 	return;
X      }
X  
X      if (w == Root)
X***************
X*** 564,570 ****
X  	    ActiveItem->state = 0;
X  	    ExecuteFunction(ActiveItem);
X  	    ActiveItem = NULL;
X- 	    XUngrabPointer(dpy, CurrentTime);
X  	}
X  
X  	return;
X--- 569,574 ----
X***************
X*** 588,597 ****
X  #endif
X  
X      XUnmapWindow(dpy, VersionWindow);
X  
X      if (w == Root)
X      {
X! 	if (Menu[event.xbutton.button] != NULL)
X  	{
X  	    XGrabPointer(dpy, Root, True,
X  		ButtonReleaseMask | ButtonMotionMask,
X--- 592,608 ----
X  #endif
X  
X      XUnmapWindow(dpy, VersionWindow);
X+     if (AddingWindow != 0)
X+     {
X+ 	AddingWindow -= 1;
X+ 	return;
X+     }
X  
X      if (w == Root)
X      {
X! 	RootFunction = NULL;
X! 	if (Menu[event.xbutton.button] != NULL &&
X! 	    Menu[event.xbutton.button]->items != 0)
X  	{
X  	    XGrabPointer(dpy, Root, True,
X  		ButtonReleaseMask | ButtonMotionMask,
X***************
X*** 612,687 ****
X      if (tmp_win == NULL)
X  	return;
X  
X!     if (w == tmp_win->frame || w == tmp_win->title_w || w == tmp_win->icon_w)
X      {
X  	if (w != tmp_win->icon_w)
X  	    w = tmp_win->frame;
X  
X! 	HandleTitleButton(w, tmp_win, event);
X! 
X  	return;
X      }
X  
X!     if (w == tmp_win->iconify_w)
X      {
X! 	if (!tmp_win->iconified)
X! 	{
X! 	    XWindowChanges xwc;
X! 	    unsigned int   xwcm;
X  
X! 	    xwcm = 0;
X! 	    xwcm |= CWX;
X! 	    xwcm |= CWY;
X  
X- 	    if (tmp_win->wmhints && tmp_win->wmhints->flags & IconPositionHint)
X- 	    {
X- 		xwc.x = tmp_win->wmhints->icon_x;
X- 		xwc.y = tmp_win->wmhints->icon_y;
X- 	    }
X- 	    else
X- 	    {
X- 		xwc.x = event.xbutton.x_root - 5;
X- 		xwc.y = event.xbutton.y_root - 5;
X- 	    }
X- 
X- 	    XConfigureWindow(dpy, tmp_win->icon_w, xwcm, &xwc);
X- 	    tmp_win->iconified = TRUE;
X- 	}
X- 
X- 	XUnmapWindow(dpy, tmp_win->frame);
X- 	XMapSubwindows(dpy, tmp_win->icon_w);
X- 	XMapRaised(dpy, tmp_win->icon_w);
X- 	if (tmp_win == Focus)
X- 	{
X- 	    XSetInputFocus(dpy, Root, RevertToPointerRoot,
X- 		CurrentTime);
X- 	    Focus = NULL;
X- 	    FocusRoot = TRUE;
X- 	}
X  	return;
X      }
X  
X      if (w == tmp_win->resize_w)
X      {
X! 	EventHandler[EnterNotify] = HandleUnknown;
X! 	EventHandler[LeaveNotify] = HandleUnknown;
X! 	StartResize(event, tmp_win);
X      }
X  
X      if (w == tmp_win->focus_w)
X      {
X! 	if (Focus != NULL && Focus != tmp_win)
X! 	{
X! 	    XUnmapWindow(dpy, Focus->hilite_w);
X! 	}
X! 	XMapWindow(dpy, tmp_win->hilite_w);
X! 	XSetInputFocus(dpy, tmp_win->w, RevertToPointerRoot,
X! 		CurrentTime);
X! 	FocusRoot = FALSE;
X! 	Focus = tmp_win;
X! 
X! 	return;
X      }
X  }
X  
X  /***********************************************************************
X--- 623,664 ----
X      if (tmp_win == NULL)
X  	return;
X  
X!     if (RootFunction != NULL)
X      {
X  	if (w != tmp_win->icon_w)
X  	    w = tmp_win->frame;
X  
X! 	HandleTitleButton(w, tmp_win, event, RootFunction);
X! 	RootFunction = NULL;
X  	return;
X      }
X  
X!     if (w == tmp_win->frame || w == tmp_win->title_w || w == tmp_win->icon_w)
X      {
X! 	if (w != tmp_win->icon_w)
X! 	    w = tmp_win->frame;
X  
X! 	HandleTitleButton(w, tmp_win, event, TitleButton[event.xbutton.button]);
X  
X  	return;
X      }
X  
X+     if (w == tmp_win->iconify_w)
X+     {
X+ 	HandleTitleButton(w, tmp_win, event, F_ICONIFY);
X+     }
X+ 
X      if (w == tmp_win->resize_w)
X      {
X! 	HandleTitleButton(w, tmp_win, event, F_RESIZE);
X      }
X  
X+ #ifndef NOFOCUS
X      if (w == tmp_win->focus_w)
X      {
X! 	HandleTitleButton(w, tmp_win, event, F_FOCUS);
X      }
X+ #endif
X  }
X  
X  /***********************************************************************
X***************
X*** 709,714 ****
X--- 686,693 ----
X  		XUnmapWindow(dpy, Focus->hilite_w);
X  
X  	    XMapWindow(dpy, tmp_win->hilite_w);
X+ 	    XSetWindowBorder(dpy, tmp_win->frame, Foreground);
X+ 	    XSetWindowBorder(dpy, tmp_win->title_w, Foreground);
X  	    XSetInputFocus(dpy, tmp_win->w, RevertToPointerRoot,
X  		    CurrentTime);
X  	    Focus = tmp_win;
X***************
X*** 792,797 ****
X--- 771,778 ----
X  	    if (event.xcrossing.detail != NotifyInferior)
X  	    {
X  		XUnmapWindow(dpy, tmp_win->hilite_w);
X+ 		XSetWindowBorderPixmap(dpy, tmp_win->frame, GrayTile);
X+ 		XSetWindowBorderPixmap(dpy, tmp_win->title_w, GrayTile);
X  		XSetInputFocus(dpy, Root, RevertToPointerRoot,
X  			CurrentTime);
X  		Focus = NULL;
X***************
X*** 880,888 ****
X  
X      SetupWindow(tmp_win,
X  	tmp_win->frame_x + event.xconfigure.x,
X! 	tmp_win->frame_y + event.xconfigure.y - TITLE_BAR_HEIGHT - BorderWidth,
X  	event.xconfigure.width,
X! 	event.xconfigure.height + TITLE_BAR_HEIGHT + BorderWidth);
X  }
X  
X  /***********************************************************************
X--- 861,869 ----
X  
X      SetupWindow(tmp_win,
X  	tmp_win->frame_x + event.xconfigure.x,
X! 	tmp_win->frame_y + event.xconfigure.y - tmp_win->title_height,
X  	event.xconfigure.width,
X! 	event.xconfigure.height + tmp_win->title_height);
X  }
X  
X  /***********************************************************************
X***************
X*** 910,923 ****
X   *	w	- the window effected by the button press
X   *	tmp_win	- the TwmWindow structure
X   *	event	- the X event structure for the button press
X   *
X   ***********************************************************************
X   */
X  
X! HandleTitleButton(w, tmp_win, event)
X  Window w;
X  TwmWindow *tmp_win ;
X  XEvent event;
X  {
X      static Time last_time = 0;
X  
X--- 891,906 ----
X   *	w	- the window effected by the button press
X   *	tmp_win	- the TwmWindow structure
X   *	event	- the X event structure for the button press
X+  *	func	- the function to perform
X   *
X   ***********************************************************************
X   */
X  
X! HandleTitleButton(w, tmp_win, event, func)
X  Window w;
X  TwmWindow *tmp_win ;
X  XEvent event;
X+ int func;
X  {
X      static Time last_time = 0;
X  
X***************
X*** 924,934 ****
X      if (event.xbutton.button > MAX_BUTTONS)
X  	return;
X  
X!     switch (TitleButton[event.xbutton.button])
X      {
X      case T_NOP:
X  	break;
X  	 
X      case T_RAISE:
X  	if (w == tmp_win->icon_w)
X  	{
X--- 907,938 ----
X      if (event.xbutton.button > MAX_BUTTONS)
X  	return;
X  
X!     switch (func)
X      {
X      case T_NOP:
X  	break;
X  	 
X+     case F_DESTROY:
X+ 	XKillClient(dpy, tmp_win->w);
X+ 	break;
X+ 
X+     case F_FOCUS:
X+ 	if (w != tmp_win->icon_w)
X+ 	{
X+ 	    if (Focus != NULL && Focus != tmp_win)
X+ 	    {
X+ 		XUnmapWindow(dpy, Focus->hilite_w);
X+ 	    }
X+ 	    XMapWindow(dpy, tmp_win->hilite_w);
X+ 	    XSetWindowBorder(dpy, tmp_win->frame, Foreground);
X+ 	    XSetInputFocus(dpy, tmp_win->w, RevertToPointerRoot,
X+ 		    CurrentTime);
X+ 	    FocusRoot = FALSE;
X+ 	    Focus = tmp_win;
X+ 	}
X+ 	break;
X+ 
X+     case F_RAISE:
X      case T_RAISE:
X  	if (w == tmp_win->icon_w)
X  	{
X***************
X*** 943,955 ****
X--- 947,1021 ----
X  	    tmp_win->icon = FALSE;
X  	}
X  	else
X+ 	{
X  	    XRaiseWindow(dpy, tmp_win->frame);
X+ 	}
X  	break;
X  
X+     case F_LOWER:
X      case T_LOWER:
X  	XLowerWindow(dpy, w);
X  	break;
X  
X+     case F_RESIZE:
X+ 	EventHandler[EnterNotify] = HandleUnknown;
X+ 	EventHandler[LeaveNotify] = HandleUnknown;
X+ 	StartResize(event, tmp_win);
X+ 	break;
X+ 
X+     case F_ICONIFY:
X+ 	if (tmp_win->icon)
X+ 	{
X+ 	    XUnmapWindow(dpy, tmp_win->icon_w);
X+ 	    XMapWindow(dpy, tmp_win->w);
X+ 	    XMapRaised(dpy, tmp_win->frame);
X+ 	    if (WarpCursor)
X+ 	    {
X+ 		XWarpPointer(dpy, None, tmp_win->frame,
X+ 		    0, 0, 0, 0, 30, 8);
X+ 	    }
X+ 	    tmp_win->icon = FALSE;
X+ 	    return;
X+ 	}
X+ 
X+ 	if (!tmp_win->iconified)
X+ 	{
X+ 	    XWindowChanges xwc;
X+ 	    unsigned int   xwcm;
X+ 
X+ 	    xwcm = 0;
X+ 	    xwcm |= CWX;
X+ 	    xwcm |= CWY;
X+ 
X+ 	    if (tmp_win->wmhints && tmp_win->wmhints->flags & IconPositionHint)
X+ 	    {
X+ 		xwc.x = tmp_win->wmhints->icon_x;
X+ 		xwc.y = tmp_win->wmhints->icon_y;
X+ 	    }
X+ 	    else
X+ 	    {
X+ 		xwc.x = event.xbutton.x_root - 5;
X+ 		xwc.y = event.xbutton.y_root - 5;
X+ 	    }
X+ 
X+ 	    XConfigureWindow(dpy, tmp_win->icon_w, xwcm, &xwc);
X+ 	    tmp_win->iconified = TRUE;
X+ 	}
X+ 
X+ 	XUnmapWindow(dpy, tmp_win->frame);
X+ 	XMapSubwindows(dpy, tmp_win->icon_w);
X+ 	XMapRaised(dpy, tmp_win->icon_w);
X+ 	if (tmp_win == Focus)
X+ 	{
X+ 	    XSetInputFocus(dpy, Root, RevertToPointerRoot,
X+ 		CurrentTime);
X+ 	    Focus = NULL;
X+ 	    FocusRoot = TRUE;
X+ 	}
X+ 	tmp_win->icon = TRUE;
X+ 	break;
X+ 
X+     case F_MOVE:
X      case T_MOVE:
X  	EventHandler[EnterNotify] = HandleUnknown;
X  	EventHandler[LeaveNotify] = HandleUnknown;
XNo differences encountered
X*** parse.c	Fri Apr 29 07:23:46 1988
X--- ../parse.c	Tue Apr 26 08:05:09 1988
X***************
X*** 25,31 ****
X  
X  /***********************************************************************
X   *
X!  * $Header: parse.c,v 1.13 88/04/15 07:09:29 tlastran Exp $
X   *
X   * parse the .twmrc file
X   *
X--- 25,31 ----
X  
X  /***********************************************************************
X   *
X!  * $Header: parse.c,v 1.14 88/04/26 08:02:45 tlastran Exp $
X   *
X   * parse the .twmrc file
X   *
X***************
X*** 35,41 ****
X  
X  #ifndef lint
X  static char RCSinfo[]=
X! "$Header: parse.c,v 1.13 88/04/15 07:09:29 tlastran Exp $";
X  #endif
X  
X  #include <stdio.h>
X--- 35,41 ----
X  
X  #ifndef lint
X  static char RCSinfo[]=
X! "$Header: parse.c,v 1.14 88/04/26 08:02:45 tlastran Exp $";
X  #endif
X  
X  #include <stdio.h>
X*** twm.c	Fri Apr 29 07:23:45 1988
X--- ../twm.c	Fri Apr 29 06:25:55 1988
X***************
X*** 25,31 ****
X  
X  /***********************************************************************
X   *
X!  * $Header: twm.c,v 1.23 88/04/15 07:09:30 tlastran Exp $
X   *
X   * twm - "Tom's Window Manager"
X   *
X--- 25,31 ----
X  
X  /***********************************************************************
X   *
X!  * $Header: twm.c,v 1.28 88/04/29 06:23:52 tlastran Exp $
X   *
X   * twm - "Tom's Window Manager"
X   *
X***************
X*** 35,41 ****
X  
X  #ifndef lint
X  static char RCSinfo[] =
X! "$Header: twm.c,v 1.23 88/04/15 07:09:30 tlastran Exp $";
X  #endif
X  
X  #include <stdio.h>
X--- 35,41 ----
X  
X  #ifndef lint
X  static char RCSinfo[] =
X! "$Header: twm.c,v 1.28 88/04/29 06:23:52 tlastran Exp $";
X  #endif
X  
X  #include <stdio.h>
X***************
X*** 51,56 ****
X--- 51,57 ----
X  #include "util.h"
X  
X  #include "twm.bm"
X+ #include "gray.bm"
X  
X  TwmWindow TwmRoot;		/* the head of the twm window list */
X  
X***************
X*** 60,65 ****
X--- 61,67 ----
X  Window VersionWindow;		/* the twm version window */
X  Window SizeWindow;		/* the resize dimensions window */
X  Window ResizeWindow;		/* the window we are resizing */
X+ Window InitialWindow;		/* the window name we are creating */
X  
X  XFontStruct *TitleBarFont;	/* title bar font structure */
X  XFontStruct *MenuFont;		/* menu font structure */
X***************
X*** 66,71 ****
X--- 68,74 ----
X  XFontStruct *IconFont;		/* icon font structure */
X  XFontStruct *SizeFont;		/* resize font structure */
X  XFontStruct *VersionFont;	/* version font structure */
X+ XFontStruct *InitialFont;	/* window creation font structure */
X  
X  char *TitleBarFontName = "8x13";/* default title bar font */
X  char *MenuFontName = "8x13";	/* default menu font */
X***************
X*** 72,77 ****
X--- 75,81 ----
X  char *IconFontName = "8x13";	/* default icon font */
X  char *SizeFontName = "fg-22";	/* default resize font */
X  char *VersionFontName = "8x13";	/* default version font */
X+ char *InitialFontName = "9x15";	/* default window creation font */
X  
X  int TitleBarFontHeight;		/* height of title bar font */
X  int MenuFontHeight;		/* height of menu font */
X***************
X*** 78,83 ****
X--- 82,88 ----
X  int IconFontHeight;		/* height of icon font */
X  int SizeFontHeight;		/* height of resize font */
X  int VersionFontHeight;		/* height of version font */
X+ int InitialFontHeight;		/* height of window creation font */
X  
X  Cursor ArrowCursor;		/* title bar cursor */
X  Cursor ButtonCursor;		/* title bar button cursor */
X***************
X*** 84,89 ****
X--- 89,97 ----
X  Cursor MoveCursor;		/* move and resize cursor */
X  Cursor ClockCursor;		/* wait a while cursor */
X  Cursor RightArrowCursor;	/* menu cursor */
X+ Cursor UpperLeftCursor;		/* upper Left corner cursor */
X+ Cursor DotCursor;		/* dot cursor for f.move, etc. from menus */
X+ Cursor SkullCursor;		/* skull and cross bones, f.destroy */
X  
X  GC TitleNormalGC;		/* GC for title bar */
X  GC MenuNormalGC;		/* normal GC for menus */
X***************
X*** 92,99 ****
X--- 100,110 ----
X  GC IconNormalGC;		/* GC for icons */
X  GC VersionNormalGC;		/* GC for the version window */
X  GC SizeNormalGC;		/* GC for the resize window */
X+ GC InitialNormalGC;		/* GC for the initial creation window */
X  GC DrawGC;			/* GC to draw lines for move and resize */
X  
X+ XClassHint NoClass;		/* for applications with no class */
X+ 
X  XContext TwmContext;		/* context for twm windows */
X  XContext MenuContext;		/* context for all menu windows */
X  
X***************
X*** 100,105 ****
X--- 111,117 ----
X  int BorderWidth = BW;		/* border width of twm windows */
X  unsigned long Foreground;	/* foreground color for all windows */
X  unsigned long Background;	/* background color for all windows */
X+ Pixmap GrayTile;
X  
X  char Version[100];		/* place to build the version string */
X  Pixmap UnknownPm = NULL;	/* the unknown icon pixmap */
X***************
X*** 117,122 ****
X--- 129,135 ----
X  int TitleBarY;			/* y coordinate to start text in the title */
X  int TitleBarX = TITLE_BAR_HEIGHT + 4;	/* x coordinate ditto */
X  int MenuY;			/* y coordiante for text in menus */
X+ int HandlingEvents = FALSE;	/* are we handling events yet? */
X  
X  Window JunkRoot;		/* junk window */
X  Window JunkChild;		/* junk window */
X***************
X*** 171,176 ****
X--- 184,192 ----
X      signal(SIGHUP, Done);
X      signal(SIGTERM, Done);
X  
X+     NoClass.res_name = NoName;
X+     NoClass.res_class = NoName;
X+ 
X      TwmRoot.next = NULL;
X      TwmRoot.prev = NULL;
X      TwmRoot.w = NULL;
X***************
X*** 213,218 ****
X--- 229,237 ----
X      RightArrowCursor = XCreateFontCursor(dpy, XC_sb_right_arrow);
X      ButtonCursor = XCreateFontCursor(dpy, XC_center_ptr);
X      ClockCursor = XCreateFontCursor(dpy, XC_watch);
X+     UpperLeftCursor = XCreateFontCursor(dpy, XC_top_left_corner);
X+     DotCursor = XCreateFontCursor(dpy, XC_dot);
X+     SkullCursor = XCreateFontCursor(dpy, XC_pirate);
X  
X      XGrabServer(dpy);
X      XSync(dpy, 0);
X***************
X*** 222,227 ****
X--- 241,249 ----
X      FirstTime = FALSE;
X      CreateGCs();
X  
X+     GrayTile = MakePixmap(Root, TitleNormalGC, gray_bits, 
X+      gray_width, gray_height);
X+ 
X      for (i = 0; i < nchildren; i++)
X      {
X  	if (MappedNotOverride(children[i]))
X***************
X*** 244,249 ****
X--- 266,274 ----
X  	BW,
X  	Foreground, Background);
X  
X+     InitialWindow = XCreateSimpleWindow(dpy, Root,
X+ 	0, 0, 5, InitialFontHeight + 4, BW, Foreground, Background);
X+ 
X      valuemask = CWBackPixmap;
X      attributes.background_pixmap = MakePixmap(VersionWindow, TitleNormalGC,
X  	twm_bits, twm_width, twm_height);
X***************
X*** 268,273 ****
X--- 293,300 ----
X  
X      XUngrabServer(dpy);
X  
X+     HandlingEvents = TRUE;
X+     InitEvents();
X      HandleEvents();
X  }
X  
XNo differences encountered
X*** events.h	Fri Apr 29 07:23:52 1988
X--- ../events.h	Wed Apr 27 10:44:08 1988
X***************
X*** 25,31 ****
X  
X  /***********************************************************************
X   *
X!  * $Header: events.h,v 1.6 88/04/15 07:09:51 tlastran Exp $
X   *
X   * twm event handler include file
X   *
X--- 25,31 ----
X  
X  /***********************************************************************
X   *
X!  * $Header: events.h,v 1.8 88/04/27 10:42:55 tlastran Exp $
X   *
X   * twm event handler include file
X   *
X***************
X*** 52,56 ****
X--- 52,63 ----
X  extern void HandleConfigureNotify();
X  extern void HandleClientMessage();
X  extern void HandleUnknown();
X+ 
X+ extern event_proc EventHandler[];
X+ extern Window DragWindow;
X+ extern int DragX;
X+ extern int DragY;
X+ extern int DragWidth;
X+ extern int DragHeight;
X  
X  #endif _EVENTS_
XNo differences encountered
X*** parse.h	Fri Apr 29 07:23:55 1988
X--- ../parse.h	Tue Apr 26 08:04:56 1988
X***************
X*** 25,31 ****
X  
X  /**********************************************************************
X   *
X!  * $Header: parse.h,v 1.2 88/04/15 07:10:10 tlastran Exp $
X   *
X   * .twmrc parsing externs
X   *
X--- 25,31 ----
X  
X  /**********************************************************************
X   *
X!  * $Header: parse.h,v 1.3 88/04/26 08:03:18 tlastran Exp $
X   *
X   * .twmrc parsing externs
X   *
X*** twm.h	Fri Apr 29 07:23:58 1988
X--- ../twm.h	Fri Apr 29 06:24:30 1988
X***************
X*** 25,31 ****
X  
X  /***********************************************************************
X   *
X!  * $Header: twm.h,v 1.14 88/04/15 07:09:40 tlastran Exp $
X   *
X   * twm include file
X   *
X--- 25,31 ----
X  
X  /***********************************************************************
X   *
X!  * $Header: twm.h,v 1.19 88/04/29 06:24:04 tlastran Exp $
X   *
X   * twm include file
X   *
X***************
X*** 45,50 ****
X--- 45,53 ----
X  #define FALSE	0
X  #endif
X  
X+ /* Define this if you want the Focus button on the titlebar */
X+ /* #define FOCUS */
X+ 
X  #define BW 2			/* border width */
X  
X  #define MAX_BUTTONS	5	/* max mouse buttons supported */
X***************
X*** 65,71 ****
X--- 68,76 ----
X      Window title_w;		/* the title bar window */
X      Window iconify_w;		/* the iconify button */
X      Window resize_w;		/* the resize button */
X+ #ifndef NOFOCUS
X      Window focus_w;		/* the focus window */
X+ #endif
X      Window hilite_w;		/* the hilite window */
X      Window icon_w;		/* the icon window */
X      int frame_x;		/* x position of frame */
X***************
X*** 80,85 ****
X--- 85,91 ----
X      XWindowAttributes attr;	/* the child window attributes */
X      XSizeHints hints;		/* normal hints */
X      XWMHints *wmhints;		/* WM hints */
X+     XClassHint class;
X      short xterm;		/* boolean indicating xterm */
X      short iconified;		/* has the window ever been iconified? */
X      short icon;			/* is the window an icon now ? */
X***************
X*** 95,100 ****
X--- 101,107 ----
X  extern Window VersionWindow;
X  extern Window SizeWindow;
X  extern Window ResizeWindow;
X+ extern Window InitialWindow;
X  
X  extern XFontStruct *TitleBarFont;
X  extern XFontStruct *MenuFont;
X***************
X*** 101,106 ****
X--- 108,114 ----
X  extern XFontStruct *IconFont;
X  extern XFontStruct *SizeFont;
X  extern XFontStruct *VersionFont;
X+ extern XFontStruct *InitialFont;
X  
X  extern char *TitleBarFontName;
X  extern char *MenuFontName;
X***************
X*** 107,112 ****
X--- 115,121 ----
X  extern char *IconFontName;
X  extern char *SizeFontName;
X  extern char *VersionFontName;
X+ extern char *InitialFontName;
X  
X  extern int TitleBarFontHeight;
X  extern int MenuFontHeight;
X***************
X*** 113,118 ****
X--- 122,128 ----
X  extern int IconFontHeight;
X  extern int SizeFontHeight;
X  extern int VersionFontHeight;
X+ extern int InitialFontHeight;
X  
X  extern Cursor ArrowCursor;
X  extern Cursor ButtonCursor;
X***************
X*** 119,124 ****
X--- 129,137 ----
X  extern Cursor MoveCursor;
X  extern Cursor ClockCursor;
X  extern Cursor RightArrowCursor;
X+ extern Cursor UpperLeftCursor;
X+ extern Cursor DotCursor;
X+ extern Cursor SkullCursor;
X  
X  extern GC TitleNormalGC;
X  extern GC MenuNormalGC;
X***************
X*** 127,134 ****
X--- 140,150 ----
X  extern GC IconNormalGC;
X  extern GC VersionNormalGC;
X  extern GC SizeNormalGC;
X+ extern GC InitialNormalGC;
X  extern GC DrawGC;
X  
X+ extern XClassHint NoClass;
X+ 
X  extern XContext TwmContext;
X  extern XContext MenuContext;
X  
X***************
X*** 135,140 ****
X--- 151,157 ----
X  extern int BorderWidth;
X  extern unsigned long Foreground;
X  extern unsigned long Background;
X+ extern Pixmap GrayTile;
X  
X  extern char Version[100];
X  extern Pixmap UnknownPm;
X***************
X*** 152,157 ****
X--- 169,175 ----
X  extern int TitleBarY;
X  extern int TitleBarX;
X  extern int MenuY;
X+ extern int HandlingEvents;
X  
X  extern Window JunkRoot;
X  extern Window JunkChild;
XNo differences encountered
X*** lex.l	Fri Apr 29 07:23:41 1988
X--- ../lex.l	Fri Apr 29 06:45:36 1988
X***************
X*** 26,32 ****
X  
X  /***********************************************************************
X   *
X!  * $Header: lex.l,v 1.19 88/04/15 07:09:32 tlastran Exp $
X   *
X   * .twmrc lex file
X   *
X--- 26,32 ----
X  
X  /***********************************************************************
X   *
X!  * $Header: lex.l,v 1.23 88/04/29 06:23:54 tlastran Exp $
X   *
X   * .twmrc lex file
X   *
X***************
X*** 35,41 ****
X   ***********************************************************************/
X  
X  static char RCSinfo[]=
X! "$Header: lex.l,v 1.19 88/04/15 07:09:32 tlastran Exp $";
X  
X  #include <stdio.h>
X  #include "gram.h"
X--- 35,41 ----
X   ***********************************************************************/
X  
X  static char RCSinfo[]=
X! "$Header: lex.l,v 1.23 88/04/29 06:23:54 tlastran Exp $";
X  
X  #include <stdio.h>
X  #include "gram.h"
X***************
X*** 63,69 ****
X  f.quit				{ return F_QUIT; }
X  f.title				{ return F_TITLE ; }
X  f.menu				{ return F_MENU; }
X! f.focus				{ return F_FOCUS; }
X  f.refresh			{ return F_REFRESH; }
X  f.file				{ return F_FILE; }
X  f.twmrc				{ return F_TWMRC; }
X--- 63,69 ----
X  f.quit				{ return F_QUIT; }
X  f.title				{ return F_TITLE ; }
X  f.menu				{ return F_MENU; }
X! f.unfocus			{ return F_UNFOCUS; }
X  f.refresh			{ return F_REFRESH; }
X  f.file				{ return F_FILE; }
X  f.twmrc				{ return F_TWMRC; }
X***************
X*** 74,79 ****
X--- 74,87 ----
X  f.cutfile			{ return F_CUTFILE; }
X  "!"				{ return F_EXEC; }
X  "^"				{ return F_CUT; }
X+ 
X+ f.move				{ return F_MOVE; }
X+ f.iconify			{ return F_ICONIFY; }
X+ f.focus				{ return F_FOCUS; }
X+ f.resize			{ return F_RESIZE; }
X+ f.raise				{ return F_RAISE; }
X+ f.lower				{ return F_LOWER; }
X+ f.destroy			{ return F_DESTROY; }
X  
X  t.nop				{ return T_NOP; }
X  t.raise				{ return T_RAISE; }
XNo differences encountered
X*** twm.man	Fri Apr 29 07:23:30 1988
X--- ../twm.man	Fri Apr 29 06:39:47 1988
X***************
X*** 192,226 ****
X  .IP "\fBf.cutfile\fP" 20
X  This function takes the contents of the window server's cut buffer 
X  and uses it as a filename to read into the server's cut buffer.
X  .IP "\fBf.file\fP \fIstring\fP" 20
X  This function assumes \fIstring\fP is a file name.  This file is read into
X  the window server's cut buffer.
X  .IP "\fBf.focus\fP" 20
X! This function assigns input focus to the root window.
X  .IP "\fBf.menu\fP \fIstring\fP" 20
X  This function assigns the pull-down menu named \fIstring\fP to a pointer
X  button.  If this function is used as an entry in a pull-down menu a 
X  pull-right menu will be assigned to the menu entry.
X  .IP "\fBf.nop\fP" 20
X  This function does nothing.
X  .IP "\fBf.quit\fP" 20
X  This function causes \fItwm\fP to exit.
X  .IP "\fBf.refresh\fP" 20
X  This function causes all windows to be refreshed.
X  .IP "\fBf.source\fP \fIstring\fP" 20
X! This funtion assumes \fIstring\fP is a file name.  The file is read 
X  and parsed as a \fItwm\fP startup file.
X  This
X  function is intended to be used only to re-build pull-down menus.  None
X  of the \fItwm\fP variables are changed.
X! .IP "\fBf.title\fP \fIstring\fP" 20
X  This function is to be used as an entry in a pull-down menu.  It centers
X! \fIstring\fP in a menu entry and outlines it with a border.  This function
X  may be used more than once in a pull-down menu.
X  .IP "\fBf.twmrc\fP" 20
X  This function causes the \fI$HOME/.twmrc\fP file to be re-read.  This
X  function is exactly like the \fBf.source\fP function without having to
X  specify the filename.
X  .IP "\fBf.version\fI" 20
X  This function causes the \fItwm\fP version window to be displayed.  This
X  window will be displayed until a pointer button is pressed or the
X--- 192,262 ----
X  .IP "\fBf.cutfile\fP" 20
X  This function takes the contents of the window server's cut buffer 
X  and uses it as a filename to read into the server's cut buffer.
X+ .IP "\fBf.destroy\fP" 20
X+ This function allows you to destroy a window client.  The cursor 
X+ is changed to a skull and crossbones and the next window
X+ to receive a button press
X+ will be destroyed.
X  .IP "\fBf.file\fP \fIstring\fP" 20
X  This function assumes \fIstring\fP is a file name.  This file is read into
X  the window server's cut buffer.
X  .IP "\fBf.focus\fP" 20
X! This function implements the same function as the keyboard focus button in
X! the title bar.  The cursor is changed to a dot and the next window
X! to receive a button press will gain the input focus.
X! .IP "\fBf.iconify\fP" 20
X! This function implements the same function as the iconify button in the
X! title bar.  The cursor is changed to a dot and the next window to 
X! receive a button press will be iconified or de-iconified depending on
X! the current state of the window.
X! .IP "\fBf.lower\fP" 20
X! This function implements the window lower function of \fBt.lower\fP,
X! but lets you get to it from a menu selection.  The cursor is changed to
X! a dot and the next window that receives a button press will be
X! the window that is lowered.
X  .IP "\fBf.menu\fP \fIstring\fP" 20
X  This function assigns the pull-down menu named \fIstring\fP to a pointer
X  button.  If this function is used as an entry in a pull-down menu a 
X  pull-right menu will be assigned to the menu entry.
X+ .IP "\fBf.move\fP" 20
X+ This function implements the window move function of \fBt.move\fP,
X+ but lets you get to it from a menu selection.  The cursor is changed to
X+ a double arrow and the next window that receives a button press will be
X+ the window that is moved.
X  .IP "\fBf.nop\fP" 20
X  This function does nothing.
X  .IP "\fBf.quit\fP" 20
X  This function causes \fItwm\fP to exit.
X+ .IP "\fBf.raise\fP" 20
X+ This function implements the window raise function of \fBt.raise\fP,
X+ but lets you get to it from a menu selection.  The cursor is changed to
X+ a dot and the next window that receives a button press will be
X+ the window that is raised.
X  .IP "\fBf.refresh\fP" 20
X  This function causes all windows to be refreshed.
X+ .IP "\fBf.resize\fP" 20
X+ This function implements the window resize function of the resize button
X+ in the title bar.
X+ The cursor is changed to
X+ a double arrow and the next window that receives a button press will be
X+ the window that is resized.
X  .IP "\fBf.source\fP \fIstring\fP" 20
X! This function assumes \fIstring\fP is a file name.  The file is read 
X  and parsed as a \fItwm\fP startup file.
X  This
X  function is intended to be used only to re-build pull-down menus.  None
X  of the \fItwm\fP variables are changed.
X! .IP "\fBf.title\fP" 20
X  This function is to be used as an entry in a pull-down menu.  It centers
X! the menu entry string in a menu entry and outlines
X! it with a border.  This function
X  may be used more than once in a pull-down menu.
X  .IP "\fBf.twmrc\fP" 20
X  This function causes the \fI$HOME/.twmrc\fP file to be re-read.  This
X  function is exactly like the \fBf.source\fP function without having to
X  specify the filename.
X+ .IP "\fBf.unfocus\fP" 20
X+ This function assigns input focus to the root window.
X  .IP "\fBf.version\fI" 20
X  This function causes the \fItwm\fP version window to be displayed.  This
X  window will be displayed until a pointer button is pressed or the
X***************
X*** 249,274 ****
X  The \fIfunction\fP portion of the menu entry is one of the Root functions
X  described in the previous section.
X  .PP
X  .SH SPECIAL FEATURES
X  .PP
X  Since the X11 xterm does not provide an icon, \fItwm\fP can provide
X  a reasonable looking one for you.  When \fItwm\fP is framing a 
X! window it looks at the name of the window to determine if it should
X! add an appropriate icon for xterm windows.  The names it looks for are:
X! .EX 0
X! xterm
X! yterm
X! console
X! login
X! .EE
X! If \fItwm\fP finds any of the above names as the first part of the window
X! name, the \fItwm\fP xterm icon bitmap is assigned as the bitmap
X  to display when the window is iconified.  
X  .PP
X! If the window name begins with the string "xterm_", only the portion of the
X! name following the "xterm_" will be displayed as the window name in the
X! title bar.  For example:  an xterm started with "-T xterm_iguana" would
X! display the name "iguana" in the title bar.
X  .PP
X  .SH EXAMPLES
X  .PP
X--- 285,320 ----
X  The \fIfunction\fP portion of the menu entry is one of the Root functions
X  described in the previous section.
X  .PP
X+ WINDOW STARTUP
X+ .PP
X+ When a client is started, \fItwm\fP allows you to position 
X+ and change the size of the window if the client has not specified
X+ an initial geometry.
X+ If the client has not specified \fBUser Specified Size\fP hints
X+ and the position of the window is (0, 0), \fItwm\fP will put up
X+ a rubberband box indicating the initial window size.  If pointer
X+ button one is pressed, the client window is created with the window
X+ position equal to the current pointer position.  If pointer button two
X+ is pressed, \fItwm\fP allows the window to be resized.  The resizing
X+ operation takes place until button two is released.  While the initial
X+ positioning of the window is taking place, \fItwm\fP will place a window
X+ in the upper-left corner of the display showing the window's name.  If
X+ resizing is taking place, \fItwm\fP will also place a window in the
X+ upper-left corner, indicating the current window size.
X+ .PP
X  .SH SPECIAL FEATURES
X  .PP
X  Since the X11 xterm does not provide an icon, \fItwm\fP can provide
X  a reasonable looking one for you.  When \fItwm\fP is framing a 
X! window it looks at the class name of the window to determine if it should
X! add an appropriate icon for xterm windows.  If the class name of
X! the client is "xterm", the
X! \fItwm\fP xterm icon bitmap is assigned as the bitmap
X  to display when the window is iconified.  
X  .PP
X! The \fItwm\fP Revision 2.0 feature of changing window names such as
X! "xterm_iguana" to "iguana" is still supported but only for
X! compatibility reasons.
X  .PP
X  .SH EXAMPLES
X  .PP
X***************
X*** 314,329 ****
X  menu "button1"
X  {
X  "Sun Systems"	f.title
X! "iguana" 	!"xterm -T xterm_iguana =80x24+100+100 -e rlogin iguana &"
X! "worm"		!"xterm -T xterm_worm =80x24+100+100 &"
X! "shiva"		!"xterm -T xterm_shiva =80x24+200+200 -e rlogin shiva &"
X! "tegus"		!"xterm -T xterm_tegus =80x24+200+200 -e rlogin tegus &"
X  "Vax Systems"	f.title
X! "shade"		!"xterm -T xterm_shade =80x24+200+200 -e rlogin shade &"
X! "bilbo"		!"xterm -T xterm_bilbo =80x24+250+250 -e rlogin bilbo &"
X! "frodo"		!"xterm -T xterm_frodo =80x24+300+300 -e rlogin frodo &"
X! "esunix" 	!"xterm -T xterm_esunix =80x24+350+350 -e rlogin esunix &"
X! "lynx8"		!"xterm -T xterm_lynx8 =80x24+390+390 -e rlogin lynx8 &"
X  }
X  
X  menu "button2"
X--- 360,375 ----
X  menu "button1"
X  {
X  "Sun Systems"	f.title
X! "iguana" 	!"xterm -T iguana =80x24+100+100 -e rlogin iguana &"
X! "worm"		!"xterm -T worm =80x24+100+100 &"
X! "shiva"		!"xterm -T shiva =80x24+200+200 -e rlogin shiva &"
X! "tegus"		!"xterm -T tegus =80x24+200+200 -e rlogin tegus &"
X  "Vax Systems"	f.title
X! "shade"		!"xterm -T shade =80x24+200+200 -e rlogin shade &"
X! "bilbo"		!"xterm -T bilbo =80x24+250+250 -e rlogin bilbo &"
X! "frodo"		!"xterm -T frodo =80x24+300+300 -e rlogin frodo &"
X! "esunix" 	!"xterm -T esunix =80x24+350+350 -e rlogin esunix &"
X! "lynx8"		!"xterm -T lynx8 =80x24+390+390 -e rlogin lynx8 &"
X  }
X  
X  menu "button2"
X***************
X*** 330,339 ****
X  {
X  "Window Ops"		f.title
X  "Refresh"		f.refresh
X! "Focus on Root"		f.focus
X  "Source .twmrc"		f.twmrc
X  "Source something"	f.source "something"
X  "twm Version"		f.version
X  }
X  
X  menu "button3"
X--- 376,392 ----
X  {
X  "Window Ops"		f.title
X  "Refresh"		f.refresh
X! "Focus on Root"		f.unfocus
X  "Source .twmrc"		f.twmrc
X  "Source something"	f.source "something"
X  "twm Version"		f.version
X+ "(De)Iconify"           f.iconify
X+ "Move Window"           f.move
X+ "Resize Window"         f.resize
X+ "Raise Window"          f.raise
X+ "Lower Window"          f.lower
X+ "Focus on Window"       f.focus
X+ "Destroy Window"        f.destroy
X  }
X  
X  menu "button3"
X***************
X*** 405,408 ****
X--- 458,465 ----
X  .SH AUTHOR
X  Thomas E. LaStrange,
X  Evans & Sutherland, Interactive Systems Division, Salt Lake City, Utah.
X+ .LP
X+ {ihnp4,decvax}!decwrl!esunix!tlastran
X+ .br
X+ {cbosgd,ulysses}!utah-cs!esunix!tlastran
X  
X
SHAR_EOF
if test 42011 -ne "`wc -c < twm.patches2`"
then
    echo shar: error transmitting "twm.patches2" '(should have been 42011 characters)'
fi
fi
# end of shell archive
exit 0