Only in ../tk1.3-new: .make.state
Only in ../tk1.3-new: .nse_depinfo
diff -c ./Makefile ../tk1.3-new/Makefile
*** ./Makefile	Tue Nov  5 11:49:30 1991
--- ../tk1.3-new/Makefile	Tue Nov 26 11:05:01 1991
***************
*** 21,30 ****
  #			compiler supports ANSI C by defining __STDC__.
  #
  
  TCL_DIR		= tcl
! XLIB		= -lX11
  CC		= cc
! CFLAGS		= -I. -I$(TCL_DIR) -g -DTK_VERSION=\"1.3/\"
  
  LIBS = libtk.a $(TCL_DIR)/libtcl.a
  
--- 21,39 ----
  #			compiler supports ANSI C by defining __STDC__.
  #
  
+ # openwindows
+ XI=$(OPENWINHOME)/include
+ XL=$(OPENWINHOME)/lib
+ MD=/usr/lib/debug/malloc.o
+ # hpux
+ XI=/usr/include/X11R4
+ XL=/usr/lib/X11R4
+ MD=
+ 
  TCL_DIR		= tcl
! XLIB		= -L$(XL) -lX11
  CC		= cc
! CFLAGS		= -I. -I$(TCL_DIR) -I$(XI) -g -DTK_VERSION=\"1.3/\"
  
  LIBS = libtk.a $(TCL_DIR)/libtcl.a
  
***************
*** 36,42 ****
          tkCmds.o tkColor.o tkConfig.o tkCursor.o tkError.o \
          tkEvent.o tkFont.o tkGC.o tkGeometry.o \
          tkOption.o tkPack.o tkPreserve.o tkSelect.o \
!         tkSend.o tkShare.o tkUid.o tkWindow.o tkWm.o $(WIDGOBJS)
  
  WIDGSRCS = tkButton.c tkEntry.c tkFrame.c tkListbox.c \
  	tkMenu.c tkMenubutton.c tkMessage.c tkScale.c \
--- 45,51 ----
          tkCmds.o tkColor.o tkConfig.o tkCursor.o tkError.o \
          tkEvent.o tkFont.o tkGC.o tkGeometry.o \
          tkOption.o tkPack.o tkPreserve.o tkSelect.o \
!         tkSend.o tkShare.o tkUid.o tkWindow.o tkWm.o $(WIDGOBJS) $(XTRA)
  
  WIDGSRCS = tkButton.c tkEntry.c tkFrame.c tkListbox.c \
  	tkMenu.c tkMenubutton.c tkMessage.c tkScale.c \
***************
*** 49,55 ****
          tkSend.c tkShare.c tkUid.c tkWindow.c tkWm.c $(WIDGSRCS)
  
  wish: main.o $(LIBS)
! 	$(CC) $(CFLAGS) main.o $(LIBS) $(XLIB) -lm -o wish
  
  libtk.a: $(OBJS)
  	rm -f libtk.a
--- 58,64 ----
          tkSend.c tkShare.c tkUid.c tkWindow.c tkWm.c $(WIDGSRCS)
  
  wish: main.o $(LIBS)
! 	$(CC) $(CFLAGS) main.o $(LIBS) $(XLIB) -lm $(MD) -o wish
  
  libtk.a: $(OBJS)
  	rm -f libtk.a
***************
*** 61,66 ****
--- 70,77 ----
  
  clean:
  	rm -f $(OBJS) main.o libtk.a wish	
+ 
+ tkWm.o: TkWmProtocol.c
  
  $(OBJS): tk.h tkInt.h
  $(WIDGOBJS): default.h
Common subdirectories: ./bitmaps and ../tk1.3-new/bitmaps
Common subdirectories: ./demos and ../tk1.3-new/demos
Common subdirectories: ./doc and ../tk1.3-new/doc
Only in ../tk1.3-new: extended
Only in ../tk1.3-new: old
Common subdirectories: ./tcl and ../tk1.3-new/tcl
Only in ../tk1.3-new: tcl6.1
diff -c ./tkBind.c ../tk1.3-new/tkBind.c
*** ./tkBind.c	Tue Oct 29 15:07:50 1991
--- ../tk1.3-new/tkBind.c	Mon Dec  2 20:18:48 1991
***************
*** 1043,1049 ****
  
  	    if (matchPtr->flags & PAT_PERCENTS) {
  		char *p;
-     
  		p = ExpandPercents(matchPtr->command, eventPtr,
  			(KeySym) key.detail, shortSpace, STATIC_SPACE);
  		result = Tcl_Eval(bindPtr->interp, p, 0, (char **) NULL);
--- 1043,1048 ----
***************
*** 1331,1336 ****
--- 1330,1336 ----
  		    && ((flags & PAT_NEARBY) == (psPtr->flags & PAT_NEARBY))
  		    && (memcmp((char *) patPtr, (char *) psPtr->pats,
  		    sequenceSize) == 0)) {
+ 		*maskPtr = eventMask; /*don't forget to pass back the mask*/
  		return psPtr;
  	    }
  	}
diff -c ./tkEvent.c ../tk1.3-new/tkEvent.c
*** ./tkEvent.c	Sun Nov  3 11:42:52 1991
--- ../tk1.3-new/tkEvent.c	Sat Nov  9 20:07:57 1991
***************
*** 490,496 ****
  		|| (eventPtr->type == SelectionRequest)
  		|| (eventPtr->type == SelectionNotify)) {
  	    TkSelEventProc((Tk_Window) winPtr, eventPtr);
! 	}
      } else {
  	for (handlerPtr = winPtr->handlerList; handlerPtr != NULL; ) {
  	    if ((handlerPtr->mask & mask) != 0) {
--- 490,503 ----
  		|| (eventPtr->type == SelectionRequest)
  		|| (eventPtr->type == SelectionNotify)) {
  	    TkSelEventProc((Tk_Window) winPtr, eventPtr);
! 	} else if ((eventPtr->type == ClientMessage)
!                 && (eventPtr->xclient.message_type == 
!                     Tk_InternAtom(winPtr, "WM_PROTOCOLS"))) {
!                 /*
!                  * this is a ICCCM WM_PROTOCOL ClientMessage 
!                  */
!                 TkWmProtocolEventProc(winPtr, eventPtr);
!         }
      } else {
  	for (handlerPtr = winPtr->handlerList; handlerPtr != NULL; ) {
  	    if ((handlerPtr->mask & mask) != 0) {
Only in ../tk1.3-new: tkText.c
diff -c ./tkWm.c ../tk1.3-new/tkWm.c
*** ./tkWm.c	Thu Oct 31 11:41:03 1991
--- ../tk1.3-new/tkWm.c	Sun Nov 10 00:28:32 1991
***************
*** 22,27 ****
--- 22,28 ----
  
  #include "tkConfig.h"
  #include "tkInt.h"
+ #include "TkWmProtocol.h"
  
  /*
   * The definitions below compensate for the lack of some definitions
***************
*** 130,135 ****
--- 131,150 ----
  				 * we know will be superceded. */
  
      int flags;			/* Miscellaneous flags, defined below. */
+ 
+     char *deleteCmd;            /* Command to execute when a WM_DELETE_WINDOW
+                                  * ICCCM ClientMessage arrives for this window.
+                                  *
+                                  * If it is the empty string "" or has never
+                                  * been set (is char *)NULL) via the "wm" tcl
+                                  * command the window is destroyed.
+                                  *
+                                  * If it is a non-empty string, the name of 
+                                  * the window is appended on to the end
+                                  * of the string and it is executed
+                                  * within the interpreter associated with
+                                  * the top level window. 
+                                  */
  } WmInfo;
  
  /*
***************
*** 236,241 ****
--- 251,257 ----
      wmPtr->xInParent = wmPtr->yInParent = 0;
      wmPtr->configRequest = 0;
      wmPtr->flags = WM_NEVER_MAPPED;
+     wmPtr->deleteCmd = (char *)0;
      winPtr->wmInfoPtr = wmPtr;
  
      /*
***************
*** 310,315 ****
--- 326,332 ----
  #endif
  
      TkWmSetClass(winPtr);
+     TkWmSetWmProtocols(winPtr);
  
      if (wmPtr->iconName != NULL) {
  	XSetIconName(winPtr->display, winPtr->window, wmPtr->iconName);
***************
*** 359,364 ****
--- 376,384 ----
      if (wmPtr->flags & WM_UPDATE_PENDING) {
  	Tk_CancelIdleCall(UpdateGeometryInfo, (ClientData) winPtr);
      }
+     if (wmPtr->deleteCmd) {
+         ckfree(wmPtr->deleteCmd);
+     }
      ckfree((char *) winPtr->wmInfoPtr);
      winPtr->wmInfoPtr = NULL;
  }
***************
*** 1025,1030 ****
--- 1045,1067 ----
  		    "couldn't send withdraw message to window manager";
  	    return TCL_ERROR;
  	}
+     } else if ((c == 'p') && (strncmp(argv[1], "protocol", length) == 0)) {
+ 	/*
+          * handle various ICCCM WM_PROTOCOL attributes
+          */
+         if (argc < 4) {
+             Tcl_AppendResult(interp, "wrong # arguments: must be \"",
+                     argv[0], " protocol window type..\"", (char *) NULL);
+             return TCL_ERROR;
+         }
+         if (!strcmp(argv[3], "delete")) {
+ 	    return WmProtocolCmd(interp, &(wmPtr->deleteCmd), argc, argv);
+ 	} else {
+ 	    Tcl_AppendResult(interp,  argv[0], 
+ 		": bad argument ", argv[3], " must be: ", 
+ 		"delete", (char *) NULL);
+             return TCL_ERROR;
+ 	}
  #endif
      } else {
  	Tcl_AppendResult(interp, "unknown or ambiguous option \"", argv[1],
***************
*** 1777,1779 ****
--- 1814,1818 ----
      *xPtr = x;
      *yPtr = y;
  }
+ 
+ #include "TkWmProtocol.c"
