diff -rwc /tmp/ctwm-3.6-orig/add_window.c /tmp/ctwm-3.6/add_window.c
*** /tmp/ctwm-3.6-orig/add_window.c	2001-12-11 10:38:52.000000000 -0500
--- /tmp/ctwm-3.6/add_window.c	2003-02-09 18:54:46.000000000 -0500
***************
*** 610,619 ****
            ((Scr->RandomPlacement == RP_UNMAPPED) &&
  	   ((tmp_win->wmhints && (tmp_win->wmhints->initial_state == IconicState)) ||
  	    (! OCCUPY (tmp_win, Scr->workSpaceMgr.activeWSPC))))) { /* just stick it somewhere */
! 	if ((PlaceX + tmp_win->attr.width) > Scr->MyDisplayWidth)
! 	    PlaceX = 50;
! 	if ((PlaceY + tmp_win->attr.height) > Scr->MyDisplayHeight)
! 	    PlaceY = 50;
  
  	tmp_win->attr.x = PlaceX;
  	tmp_win->attr.y = PlaceY;
--- 610,637 ----
            ((Scr->RandomPlacement == RP_UNMAPPED) &&
  	   ((tmp_win->wmhints && (tmp_win->wmhints->initial_state == IconicState)) ||
  	    (! OCCUPY (tmp_win, Scr->workSpaceMgr.activeWSPC))))) { /* just stick it somewhere */
! 	if ((PlaceX + tmp_win->attr.width) > Scr->MyDisplayWidth) {
! 	  if (!Scr->DontMoveOff) { /* Honor the user's wishes */
! 	    PlaceX = 50;	/* Anything goes... */
! 	  } else {
! 	    int available = Scr->MyDisplayWidth - tmp_win->attr.width; /* Available room */
! 	    if (available <= 0)	/* Larger than the screen */
! 	      PlaceX = 0;	/* Just stick it at the top */
! 	    else
! 	      PlaceX = rand() % available; /* Anywhere's good... */
! 	  }
! 	}
! 	if ((PlaceY + tmp_win->attr.height) > Scr->MyDisplayHeight) {
! 	  if (!Scr->DontMoveOff) { /* Honor the user's wishes */
! 	    PlaceY = 50;	/* Anything goes... */
! 	  } else {
! 	    int available = Scr->MyDisplayHeight - tmp_win->attr.height; /* Available room */
! 	    if (available <= 0)	/* Larger than the screen */
! 	      PlaceY = 0;	/* Just stick it at the top */
! 	    else
! 	      PlaceY = rand() % available; /* Anywhere's good... */
! 	  }
! 	}
  
  	tmp_win->attr.x = PlaceX;
  	tmp_win->attr.y = PlaceY;
Only in /tmp/ctwm-3.6: add_window.c~
Only in /tmp/ctwm-3.6: add_window.o
Only in /tmp/ctwm-3.6: clicktofocus.o
Only in /tmp/ctwm-3.6: ctwm
Only in /tmp/ctwm-3.6: ctwm._man
Only in /tmp/ctwm-3.6: ctwm.o
Only in /tmp/ctwm-3.6: cursor.o
Only in /tmp/ctwm-3.6: deftwmrc.c
Only in /tmp/ctwm-3.6: deftwmrc.o
diff -rwc /tmp/ctwm-3.6-orig/events.c /tmp/ctwm-3.6/events.c
*** /tmp/ctwm-3.6-orig/events.c	2001-12-11 10:38:52.000000000 -0500
--- /tmp/ctwm-3.6/events.c	2003-01-25 14:03:22.000000000 -0500
***************
*** 1228,1233 ****
--- 1228,1235 ----
  	    Context = C_ICONMGR;
  	if (Tmp_win->list && Event.xany.window == Tmp_win->list->icon)
  	    Context = C_ICONMGR;
+ 	if (Tmp_win == Scr->workSpaceMgr.workspaceWindow.twm_win)
+ 	    Context = C_WORKSPACE;
      }
  
      modifier = (Event.xkey.state | AlternateKeymap) & mods_used;
Only in /tmp/ctwm-3.6: events.c~
Only in /tmp/ctwm-3.6: events.c.orig
Only in /tmp/ctwm-3.6: events.o
Only in /tmp/ctwm-3.6: gc.o
Only in /tmp/ctwm-3.6: gram.c
Only in /tmp/ctwm-3.6: gram.h
Only in /tmp/ctwm-3.6: gram.o
diff -rwc /tmp/ctwm-3.6-orig/gram.y /tmp/ctwm-3.6/gram.y
*** /tmp/ctwm-3.6-orig/gram.y	2001-12-11 10:38:52.000000000 -0500
--- /tmp/ctwm-3.6/gram.y	2002-06-17 18:12:46.000000000 -0400
***************
*** 514,519 ****
--- 514,520 ----
  		| ICON			{ cont |= C_ICON_BIT; }
  		| ROOT			{ cont |= C_ROOT_BIT; }
  		| FRAME			{ cont |= C_FRAME_BIT; }
+ 		| WORKSPACE		{ cont |= C_WORKSPACE_BIT; }
  		| ICONMGR		{ cont |= C_ICONMGR_BIT; }
  		| META			{ cont |= C_ICONMGR_BIT; }
  		| ALTER                 { cont |= C_ALTER_BIT; }
***************
*** 530,535 ****
--- 531,537 ----
  		| ICON			{ cont |= C_ICON_BIT; }
  		| ROOT			{ cont |= C_ROOT_BIT; }
  		| FRAME			{ cont |= C_FRAME_BIT; }
+ 		| WORKSPACE		{ cont |= C_WORKSPACE_BIT; }
  		| ICONMGR		{ cont |= C_ICONMGR_BIT; }
  		| META			{ cont |= C_ICONMGR_BIT; }
  		| ALL			{ cont |= C_ALL_BITS; }
Only in /tmp/ctwm-3.6: gram.y.orig
diff -rwc /tmp/ctwm-3.6-orig/iconmgr.c /tmp/ctwm-3.6/iconmgr.c
*** /tmp/ctwm-3.6-orig/iconmgr.c	2001-12-11 10:38:52.000000000 -0500
--- /tmp/ctwm-3.6/iconmgr.c	2003-01-25 13:55:21.000000000 -0500
***************
*** 634,642 ****
--- 634,647 ----
      valuemask = (CWBackPixel | CWBorderPixel | CWEventMask | CWCursor);
      attributes.background_pixel = tmp->cp.back;
      attributes.border_pixel = tmp->cp.back;
+     if (Scr->IconManagerFocus) {
        attributes.event_mask = (KeyPressMask | ButtonPressMask |
  			       ButtonReleaseMask | ExposureMask |
  			       EnterWindowMask | LeaveWindowMask);
+     } else {
+       attributes.event_mask = (KeyPressMask | ButtonPressMask |
+ 			       ButtonReleaseMask | ExposureMask);
+     }
      attributes.cursor = Scr->IconMgrCursor;
      tmp->w = XCreateWindow (dpy, ip->w, 0, 0, (unsigned int) 1, 
  			    (unsigned int) h, (unsigned int) 0, 
Only in /tmp/ctwm-3.6: iconmgr.c~
Only in /tmp/ctwm-3.6: iconmgr.o
Only in /tmp/ctwm-3.6: icons.o
Only in /tmp/ctwm-3.6: junk
Only in /tmp/ctwm-3.6: lex.c
Only in /tmp/ctwm-3.6: lex.o
Only in /tmp/ctwm-3.6: libctwm.a
Only in /tmp/ctwm-3.6: libctwm.o
Only in /tmp/ctwm-3.6: list.o
Only in /tmp/ctwm-3.6: Makefile
Only in /tmp/ctwm-3.6: menus.c~
Only in /tmp/ctwm-3.6: menus.o
Only in /tmp/ctwm-3.6: parse.o
Only in /tmp/ctwm-3.6: resize.o
diff -rwc /tmp/ctwm-3.6-orig/twm.h /tmp/ctwm-3.6/twm.h
*** /tmp/ctwm-3.6-orig/twm.h	2001-12-11 10:38:52.000000000 -0500
--- /tmp/ctwm-3.6/twm.h	2002-06-17 18:12:46.000000000 -0400
***************
*** 145,151 ****
  #define C_NAME		6
  #define C_IDENTIFY      7
  #define C_ALTERNATE     8
! #define NUM_CONTEXTS	9
  
  #define C_WINDOW_BIT	(1 << C_WINDOW)
  #define C_TITLE_BIT	(1 << C_TITLE)
--- 145,152 ----
  #define C_NAME		6
  #define C_IDENTIFY      7
  #define C_ALTERNATE     8
! #define C_WORKSPACE	9
! #define NUM_CONTEXTS	10
  
  #define C_WINDOW_BIT	(1 << C_WINDOW)
  #define C_TITLE_BIT	(1 << C_TITLE)
***************
*** 155,162 ****
  #define C_ICONMGR_BIT	(1 << C_ICONMGR)
  #define C_NAME_BIT	(1 << C_NAME)
  #define C_ALTER_BIT	(1 << C_ALTERNATE)
  
! #define C_ALL_BITS	(C_WINDOW_BIT | C_TITLE_BIT | C_ICON_BIT |\
  			 C_ROOT_BIT | C_FRAME_BIT | C_ICONMGR_BIT)
  
  /* modifiers for button presses */
--- 156,164 ----
  #define C_ICONMGR_BIT	(1 << C_ICONMGR)
  #define C_NAME_BIT	(1 << C_NAME)
  #define C_ALTER_BIT	(1 << C_ALTERNATE)
+ #define C_WORKSPACE_BIT	(1 << C_WORKSPACE)
  
! #define C_ALL_BITS	(C_WORKSPACE_BIT | C_WINDOW_BIT | C_TITLE_BIT | C_ICON_BIT |\
  			 C_ROOT_BIT | C_FRAME_BIT | C_ICONMGR_BIT)
  
  /* modifiers for button presses */
Only in /tmp/ctwm-3.6: twm.h.orig
diff -rwc /tmp/ctwm-3.6-orig/util.c /tmp/ctwm-3.6/util.c
*** /tmp/ctwm-3.6-orig/util.c	2001-12-11 10:38:52.000000000 -0500
--- /tmp/ctwm-3.6/util.c	2002-12-15 16:33:13.000000000 -0500
***************
*** 64,69 ****
--- 64,76 ----
   *
   * 22-April-92 Claude Lecommandeur.
   *
+  * Changed behavior of DontMoveOff/MoveOffResistance to allow
+  * moving a window off screen less than #MoveOffResistance pixels.
+  * New code will no longer "snap" windows to #MoveOffResistance
+  * pixels off screen and instead movements will just be stopped and
+  * then resume once movement of #MoveOffResistance have been attempted.
+  *
+  * 15-December-02 Bjorn Knutsson 
   *
   ***********************************************************************/
  
***************
*** 3972,3982 ****
  int *value;
  int border;
  {
!     if (*value < border &&
!         (Scr->MoveOffResistance < 0 ||
!          *value > border - Scr->MoveOffResistance))
      {
          *value = border;
      }
  }
  
--- 3979,3994 ----
  int *value;
  int border;
  {
!   if (*value < border) {
!     if (Scr->MoveOffResistance < 0 ||
! 	*value > border - Scr->MoveOffResistance)
      {
          *value = border;
+     } else if (Scr->MoveOffResistance > 0 &&
+ 	       *value <= border - Scr->MoveOffResistance)
+     {
+       *value = *value + Scr->MoveOffResistance;
+     }
    }
  }
  
***************
*** 3986,3996 ****
  int border;
  int size2;
  {
!     if (*value + size1 > size2 - border &&
!         (Scr->MoveOffResistance < 0 ||
!          *value + size1 < size2 - border + Scr->MoveOffResistance))
      {
          *value = size2 - size1 - border;
      }
  }
  
--- 3998,4012 ----
  int border;
  int size2;
  {
!     if (*value + size1 > size2 - border) {
!       if (Scr->MoveOffResistance < 0 ||
!          *value + size1 < size2 - border + Scr->MoveOffResistance)
  	{
  	  *value = size2 - size1 - border;
+ 	} else if (Scr->MoveOffResistance > 0 &&
+ 		   *value + size1 >= size2 - border + Scr->MoveOffResistance) {
+ 	  *value = *value - Scr->MoveOffResistance;
+ 	}
      }
  }

diff -rwc /tmp/ctwm-3.6-orig/gram.y /tmp/ctwm-3.6/gram.y
*** /tmp/ctwm-3.6-orig/gram.y	2001-12-11 10:38:52.000000000 -0500
--- /tmp/ctwm-3.6/gram.y	2002-06-17 18:12:46.000000000 -0400
***************
*** 685,691 ****
                | wingeom_entries wingeom_entry
                ;
  
! wingeom_entry : string string { AddToList (&Scr->WindowGeometries, $1, $2) }
  
  
  
--- 685,691 ----
                | wingeom_entries wingeom_entry
                ;
  
! wingeom_entry : string string { AddToList (&Scr->WindowGeometries, $1, $2); }
  
  
  
