<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,33 +1,33 @@
 
 *** Step 1:  Preparation
 
-You need gcc 2.96 (or later) and GNU's version of make.
+You need gcc 4 (or later) and GNU's version of make.
 
 You should find a computer where you can compile to the local disk.
 Compiling to a remote disk over NFS is usually very slow.
 
-Decide where you want the JX-2.5.0 directory to reside.  Absolute paths are
+Decide where you want the JX directory to reside.  Absolute paths are
 compiled into some of the utility programs, so you will have to rebuild
-everything if you move JX-2.5.0 to a different location after building it.
+everything if you move JX to a different location after building it.
 
 
 *** Step 2:  Compiling
 
-If you want the binaries installed somewhere other than ~/bin (or
-JX-2.5.0/bin, if ~/bin doesn't exist), set the environment variable
-JX_INSTALL_ROOT to the desired directory.
+If you want the binaries installed somewhere other than ~/bin (or JX/bin,
+if ~/bin doesn't exist), set the environment variable JX_INSTALL_ROOT to
+the desired directory.
 
   Use &quot;setenv JX_INSTALL_ROOT value&quot; at the top of ~/.cshrc if you use csh
   or &quot;export JX_INSTALL_ROOT=value&quot; at the top of ~/.bashrc if you use
   bash.
 
-This directory (JX-2.5.0/bin, ~/bin, or $JX_INSTALL_ROOT), must be on your
+This directory (JX/bin, ~/bin, or $JX_INSTALL_ROOT), must be on your
 execution path.
 
   Use &quot;set path = ( new_path $path )&quot; at the top of ~/.cshrc if you use csh
   or &quot;export PATH=new_path:$PATH&quot; at the top of ~/.bashrc if you use bash.
 
-Do not add JX-2.5.0/lib to your LD_LIBRARY_PATH.  This will cause conflicts
+Do not add JX/lib to your LD_LIBRARY_PATH.  This will cause conflicts
 with the shared libraries used by Code Crusader, Code Medic, etc.
 
 Run &quot;make&quot; and following the instructions for setting ACE_ROOT and
@@ -37,8 +37,8 @@ and install the programs.  You can ignore any errors that make ignores.
   You can avoid installing the binaries by setting the environment variable
   J_WANT_INSTALL equal to 0.
 
-  Everything in JX-2.5.0 will be built, including any 3rd party libraries
-  and programs that you unpack after the main distribution.
+  Everything in JX will be built, including any 3rd party libraries and
+  programs that you unpack after the main distribution.
 
 If you cannot use the version of libXpm already installed on your system
 (e.g. because it is too old) or if you do not have libXpm at all, then</diff>
      <filename>INSTALL</filename>
    </modified>
    <modified>
      <diff>@@ -288,6 +288,12 @@ prep: check_install_dir fix_ace clean_links
          chmod u+w libjcore/code/jStringData.h; \
          } \
      fi
+	@if { test -d Mesa/. ; } then \
+         { \
+         ln -sf ../../src/mesa/drivers/x11/xmesa.h   Mesa/include/GL/xmesa.h; \
+         ln -sf ../../src/mesa/drivers/x11/xmesa_x.h Mesa/include/GL/xmesa_x.h; \
+         } \
+     fi
 
 # Solaris test doesn't support ! operator
 </diff>
      <filename>Makefile</filename>
    </modified>
    <modified>
      <diff>@@ -54,9 +54,11 @@ ifneq (${J_USE_THREADS},yes)
   J_RAW_SYSTEM_STUFF += -DACE_MT_SAFE=0
 endif
 
+# -Wno-write-strings to avoid warnings from auto-generated XPM files
+
 ifeq (${JX_HAS_GNUG},1)
   J_RAW_SYSTEM_STUFF += \
-    -Wall -Wno-unused \
+    -Wall -Wno-unused -Wno-write-strings \
     -fno-implicit-templates -DJ_EXPLICIT_TEMPLATES
 
   ifeq (${J_COMPILE_DEBUG},-g)</diff>
      <filename>include/make/jx_config_common</filename>
    </modified>
    <modified>
      <diff>@@ -93,7 +93,7 @@ CXXFLAGS  = ${J_MAKE_NEEDS_OUTPUT_ARG}
 J_GCC_LIBS  := -lstdc++ -lm -lc -ldl
 J_ACE_LIBS  := -L${JX_ROOT}/lib -lACE-${ACE_LIB_VERSION}
 J_X11_LIBS  := -L${JX_ROOT}/lib ${J_X11_LIB_DIR} ${J_XINERAMA_LIBS} -lXext -lXpm -lX11
-J_MESA_LIBS := -L${JX_ROOT}/lib -lglut -lGLU -lGL
+J_MESA_LIBS := -L${JX_ROOT}/lib -lglut -lGLU -lGL -lpthread
 
 # gzipped libraries to include in RPM
 </diff>
      <filename>include/make/sys/Linux-Intel-gcc3</filename>
    </modified>
    <modified>
      <diff>@@ -74,6 +74,7 @@ static const char* kCurrentJCoreLibVersionStr = &quot;2.5.0&quot;;
 //		Added JGetVCSRepositoryPath().
 //		Added kJGitType.
 //		Added JIsManagedByVCS().
+//		Added JGetVCSDirectoryNames().
 //	JTextEditor:
 //		Added boolean deleteToTabStop argument to TEHandleKeyPress().
 //		Added CleanAllWhitespace(), CleanSelectedWhitespace(), CleanWhitespace().</diff>
      <filename>libjcore/code/JCoreLibVersion.h</filename>
    </modified>
    <modified>
      <diff>@@ -25,6 +25,16 @@ static const JCharacter* kSubversionDirName  = &quot;.svn&quot;;
 static const JCharacter* kCVSDirName         = &quot;CVS&quot;;
 static const JCharacter* kSCCSDirName        = &quot;SCCS&quot;;
 
+static const JCharacter* kDirName[] =
+{
+	kGitDirName,
+	kSubversionDirName,
+	kCVSDirName,
+	kSCCSDirName
+};
+
+const JSize kDirCount = sizeof(kDirName) / sizeof(const JCharacter*);
+
 // error types
 
 const JCharacter* kJUnsupportedVCS = &quot;JUnsupportedVCS&quot;;
@@ -59,6 +69,21 @@ JIsVCSDirectory
 }
 
 /******************************************************************************
+ JGetVCSDirectoryNames
+
+ ******************************************************************************/
+
+JSize
+JGetVCSDirectoryNames
+	(
+	const JCharacter*** dirNames
+	)
+{
+	*dirNames = kDirName;
+	return kDirCount;
+}
+
+/******************************************************************************
  JGetVCSType
 
  ******************************************************************************/</diff>
      <filename>libjcore/code/jVCSUtil.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -33,6 +33,7 @@ public:
 };
 
 JBoolean	JIsVCSDirectory(const JCharacter* name);
+JSize		JGetVCSDirectoryNames(const JCharacter*** dirNames);
 JVCSType	JGetVCSType(const JCharacter* path);
 JBoolean	JIsManagedByVCS(const JCharacter* fullName, JVCSType* returnType = NULL);
 </diff>
      <filename>libjcore/code/jVCSUtil.h</filename>
    </modified>
    <modified>
      <diff>@@ -31,7 +31,7 @@ RunWithFiles::JXFSRunFileDialog	&quot;Command to run on the selected file(s):&quot;
 
 DefaultBindingList::JFSBindingList
 
-&quot;2 F F \&quot;/bin/sh -c $q\&quot; \&quot;xterm -title $q -n $q -e $u\&quot;
+&quot;2 F F \&quot;/bin/sh -c $q\&quot; \&quot;gnome-terminal --title $q -x $u\&quot;
 \&quot;.gif\&quot;  \&quot;eog\&quot; p F
 \&quot;.png\&quot;  \&quot;eog\&quot; p F
 \&quot;.jpg\&quot;  \&quot;eog\&quot; p F
@@ -84,7 +84,7 @@ DefaultBindingList::JFSBindingList
 
 DefaultBindingList-OSX::JFSBindingList
 
-&quot;2 F F \&quot;/bin/sh -c $q\&quot; \&quot;xterm -title $q -n $q -e $u\&quot;
+&quot;2 F F \&quot;/bin/sh -c $q\&quot; \&quot;gnome-terminal --title $q -x $u\&quot;
 \&quot;.gif\&quot;  \&quot;open\&quot; p F
 \&quot;.png\&quot;  \&quot;open\&quot; p F
 \&quot;.jpg\&quot;  \&quot;open\&quot; p F</diff>
      <filename>libjfs/strings/jfs_strings</filename>
    </modified>
    <modified>
      <diff>@@ -16,6 +16,7 @@
 .cpp ./code/JXDisplay
 .cpp ./code/JXDisplayMenu
 .cpp ./code/JXWindow
+.cpp ./code/JXIncrementWindowAPAMMTask
 .cpp ./code/JXIconDirector
 .cpp ./code/JXWindowIcon
 .cpp ./code/JXButtonStates</diff>
      <filename>libjx/Make.files</filename>
    </modified>
    <modified>
      <diff>@@ -50,30 +50,33 @@ const clock_t kWaitForLastStatusTime     = 10 * CLOCKS_PER_SEC;
 
 // atom names
 
-static const JCharacter* kDNDSelectionXAtomName = &quot;XdndSelection&quot;;
-
-static const JCharacter* kDNDProxyXAtomName    = &quot;XdndProxy&quot;;
-static const JCharacter* kDNDAwareXAtomName    = &quot;XdndAware&quot;;
-static const JCharacter* kDNDTypeListXAtomName = &quot;XdndTypeList&quot;;
-
-static const JCharacter* kDNDEnterXAtomName    = &quot;XdndEnter&quot;;
-static const JCharacter* kDNDHereXAtomName     = &quot;XdndPosition&quot;;
-static const JCharacter* kDNDStatusXAtomName   = &quot;XdndStatus&quot;;
-static const JCharacter* kDNDLeaveXAtomName    = &quot;XdndLeave&quot;;
-static const JCharacter* kDNDDropXAtomName     = &quot;XdndDrop&quot;;
-static const JCharacter* kDNDFinishedXAtomName = &quot;XdndFinished&quot;;
-
-static const JCharacter* kDNDActionCopyXAtomName       = &quot;XdndActionCopy&quot;;
-static const JCharacter* kDNDActionMoveXAtomName       = &quot;XdndActionMove&quot;;
-static const JCharacter* kDNDActionLinkXAtomName       = &quot;XdndActionLink&quot;;
-static const JCharacter* kDNDActionAskXAtomName        = &quot;XdndActionAsk&quot;;
-static const JCharacter* kDNDActionPrivateXAtomName    = &quot;XdndActionPrivate&quot;;
-static const JCharacter* kDNDActionDirectSaveXAtomName = &quot;XdndActionDirectSave&quot;;
-
-static const JCharacter* kDNDActionListXAtomName        = &quot;XdndActionList&quot;;
-static const JCharacter* kDNDActionDescriptionXAtomName = &quot;XdndActionDescription&quot;;
-
-static const JCharacter* kDNDDirectSave0XAtomName = &quot;XdndDirectSave0&quot;;
+static const JCharacter* kAtomNames[ JXDNDManager::kAtomCount ] =
+{
+	&quot;XdndSelection&quot;,
+
+	&quot;XdndProxy&quot;,
+	&quot;XdndAware&quot;,
+	&quot;XdndTypeList&quot;,
+
+	&quot;XdndEnter&quot;,
+	&quot;XdndPosition&quot;,
+	&quot;XdndStatus&quot;,
+	&quot;XdndLeave&quot;,
+	&quot;XdndDrop&quot;,
+	&quot;XdndFinished&quot;,
+
+	&quot;XdndActionCopy&quot;,
+	&quot;XdndActionMove&quot;,
+	&quot;XdndActionLink&quot;,
+	&quot;XdndActionAsk&quot;,
+	&quot;XdndActionPrivate&quot;,
+	&quot;XdndActionDirectSave&quot;,
+
+	&quot;XdndActionList&quot;,
+	&quot;XdndActionDescription&quot;,
+
+	&quot;XdndDirectSave0&quot;
+};
 
 // message data
 
@@ -176,32 +179,7 @@ JXDNDManager::JXDNDManager
 
 	InitCursors();
 
-	// create required X atoms
-
-	itsDNDSelectionName = itsDisplay-&gt;RegisterXAtom(kDNDSelectionXAtomName);
-
-	itsDNDProxyXAtom    = itsDisplay-&gt;RegisterXAtom(kDNDProxyXAtomName);
-	itsDNDAwareXAtom    = itsDisplay-&gt;RegisterXAtom(kDNDAwareXAtomName);
-	itsDNDTypeListXAtom = itsDisplay-&gt;RegisterXAtom(kDNDTypeListXAtomName);
-
-	itsDNDEnterXAtom    = itsDisplay-&gt;RegisterXAtom(kDNDEnterXAtomName);
-	itsDNDHereXAtom     = itsDisplay-&gt;RegisterXAtom(kDNDHereXAtomName);
-	itsDNDStatusXAtom   = itsDisplay-&gt;RegisterXAtom(kDNDStatusXAtomName);
-	itsDNDLeaveXAtom    = itsDisplay-&gt;RegisterXAtom(kDNDLeaveXAtomName);
-	itsDNDDropXAtom     = itsDisplay-&gt;RegisterXAtom(kDNDDropXAtomName);
-	itsDNDFinishedXAtom = itsDisplay-&gt;RegisterXAtom(kDNDFinishedXAtomName);
-
-	itsDNDActionCopyXAtom       = itsDisplay-&gt;RegisterXAtom(kDNDActionCopyXAtomName);
-	itsDNDActionMoveXAtom       = itsDisplay-&gt;RegisterXAtom(kDNDActionMoveXAtomName);
-	itsDNDActionLinkXAtom       = itsDisplay-&gt;RegisterXAtom(kDNDActionLinkXAtomName);
-	itsDNDActionAskXAtom        = itsDisplay-&gt;RegisterXAtom(kDNDActionAskXAtomName);
-	itsDNDActionPrivateXAtom    = itsDisplay-&gt;RegisterXAtom(kDNDActionPrivateXAtomName);
-	itsDNDActionDirectSaveXAtom = itsDisplay-&gt;RegisterXAtom(kDNDActionDirectSaveXAtomName);
-
-	itsDNDActionListXAtom        = itsDisplay-&gt;RegisterXAtom(kDNDActionListXAtomName);
-	itsDNDActionDescriptionXAtom = itsDisplay-&gt;RegisterXAtom(kDNDActionDescriptionXAtomName);
-
-	itsDNDDirectSave0XAtom = itsDisplay-&gt;RegisterXAtom(kDNDDirectSave0XAtomName);
+	itsDisplay-&gt;RegisterXAtoms(kAtomCount, kAtomNames, itsAtoms);
 }
 
 /******************************************************************************
@@ -268,7 +246,7 @@ JXDNDManager::BeginDND
 	itsPrevHandleDNDScrollButton = (JXMouseButton) 0;
 	itsPrevHandleDNDModifiers.Clear();
 
-	if ((itsDisplay-&gt;GetSelectionManager())-&gt;SetData(itsDNDSelectionName, data))
+	if ((itsDisplay-&gt;GetSelectionManager())-&gt;SetData(itsAtoms[ kDNDSelectionAtomIndex ], data))
 		{
 		itsIsDraggingFlag   = kJTrue;
 		itsDragger          = widget;
@@ -328,8 +306,8 @@ JXDNDManager::HandleDND
 
 	const Atom dropAction =
 		itsDragger-&gt;GetDNDAction(itsMouseContainer, buttonStates, modifiers);
-	if (dropAction == itsDNDActionAskXAtom &amp;&amp;
-		itsPrevHandleDNDAction != itsDNDActionAskXAtom)
+	if (dropAction == itsAtoms[ kDNDActionAskAtomIndex ] &amp;&amp;
+		itsPrevHandleDNDAction != itsAtoms[ kDNDActionAskAtomIndex ])
 		{
 		AnnounceAskActions(buttonStates, modifiers);
 		}
@@ -556,7 +534,7 @@ JXDNDManager::EnableDND
 	const
 {
 	XChangeProperty(*itsDisplay, xWindow,
-					itsDNDAwareXAtom, XA_ATOM, 32,
+					itsAtoms[ kDNDAwareAtomIndex ], XA_ATOM, 32,
 					PropModeReplace,
 					(unsigned char*) &amp;kCurrentDNDVersion, 1);
 }
@@ -590,7 +568,7 @@ JXDNDManager::IsDNDAware
 	int actualFormat;
 	unsigned long itemCount, remainingBytes;
 	unsigned char* rawData = NULL;
-	XGetWindowProperty(*itsDisplay, xWindow, itsDNDProxyXAtom,
+	XGetWindowProperty(*itsDisplay, xWindow, itsAtoms[ kDNDProxyAtomIndex ],
 					   0, LONG_MAX, False, XA_WINDOW,
 					   &amp;actualType, &amp;actualFormat,
 					   &amp;itemCount, &amp;remainingBytes, &amp;rawData);
@@ -604,7 +582,7 @@ JXDNDManager::IsDNDAware
 
 		// check XdndProxy on proxy window -- must point to itself
 
-		XGetWindowProperty(*itsDisplay, *proxy, itsDNDProxyXAtom,
+		XGetWindowProperty(*itsDisplay, *proxy, itsAtoms[ kDNDProxyAtomIndex ],
 						   0, LONG_MAX, False, XA_WINDOW,
 						   &amp;actualType, &amp;actualFormat,
 						   &amp;itemCount, &amp;remainingBytes, &amp;rawData);
@@ -621,7 +599,7 @@ JXDNDManager::IsDNDAware
 
 	// check XdndAware
 
-	XGetWindowProperty(*itsDisplay, *proxy, itsDNDAwareXAtom,
+	XGetWindowProperty(*itsDisplay, *proxy, itsAtoms[ kDNDAwareAtomIndex ],
 					   0, LONG_MAX, False, XA_ATOM,
 					   &amp;actualType, &amp;actualFormat,
 					   &amp;itemCount, &amp;remainingBytes, &amp;rawData);
@@ -664,7 +642,7 @@ JXDNDManager::AnnounceTypeList
 	if (typeCount &gt; kDNDEnterTypeCount)
 		{
 		XChangeProperty(*itsDisplay, xWindow,
-						itsDNDTypeListXAtom, XA_ATOM, 32,
+						itsAtoms[ kDNDTypeListAtomIndex ], XA_ATOM, 32,
 						PropModeReplace,
 						(unsigned char*) list.GetCArray(), typeCount);
 		}
@@ -728,13 +706,13 @@ JXDNDManager::AnnounceAskActions
 	assert( count &gt;= 2 &amp;&amp; count == itsDraggerAskDescripList-&gt;GetElementCount() );
 
 	XChangeProperty(*itsDisplay, itsDraggerWindow,
-					itsDNDActionListXAtom, XA_ATOM, 32,
+					itsAtoms[ kDNDActionListAtomIndex ], XA_ATOM, 32,
 					PropModeReplace,
 					(unsigned char*) itsDraggerAskActionList-&gt;GetCArray(), count);
 
 	const JString descripData = JXPackStrings(*itsDraggerAskDescripList);
 	XChangeProperty(*itsDisplay, itsDraggerWindow,
-					itsDNDActionDescriptionXAtom, XA_STRING, 8,
+					itsAtoms[ kDNDActionDescriptionAtomIndex ], XA_STRING, 8,
 					PropModeReplace,
 					(unsigned char*) descripData.GetCString(),
 					descripData.GetLength());
@@ -778,7 +756,7 @@ JXDNDManager::GetAskActions
 
 		// get action atoms
 
-		XGetWindowProperty(*itsDisplay, itsDraggerWindow, itsDNDActionListXAtom,
+		XGetWindowProperty(*itsDisplay, itsDraggerWindow, itsAtoms[ kDNDActionListAtomIndex ],
 						   0, LONG_MAX, False, XA_ATOM,
 						   &amp;actualType, &amp;actualFormat,
 						   &amp;itemCount, &amp;remainingBytes, &amp;rawData);
@@ -796,7 +774,7 @@ JXDNDManager::GetAskActions
 
 		// get action descriptions
 
-		XGetWindowProperty(*itsDisplay, itsDraggerWindow, itsDNDActionDescriptionXAtom,
+		XGetWindowProperty(*itsDisplay, itsDraggerWindow, itsAtoms[ kDNDActionDescriptionAtomIndex ],
 						   0, LONG_MAX, False, XA_STRING,
 						   &amp;actualType, &amp;actualFormat,
 						   &amp;itemCount, &amp;remainingBytes, &amp;rawData);
@@ -969,7 +947,7 @@ JXDNDManager::SendDNDEnter
 		message.type         = ClientMessage;
 		message.display      = *itsDisplay;
 		message.window       = itsMouseWindow;
-		message.message_type = itsDNDEnterXAtom;
+		message.message_type = itsAtoms[ kDNDEnterAtomIndex ];
 		message.format       = 32;
 
 		message.data.l[ kDNDEnterWindow ] = itsDraggerWindow;
@@ -1075,7 +1053,7 @@ JXDNDManager::SendDNDHere
 		message.type         = ClientMessage;
 		message.display      = *itsDisplay;
 		message.window       = itsMouseWindow;
-		message.message_type = itsDNDHereXAtom;
+		message.message_type = itsAtoms[ kDNDHereAtomIndex ];
 		message.format       = 32;
 
 		message.data.l[ kDNDHereWindow    ] = itsDraggerWindow;
@@ -1137,7 +1115,7 @@ JXDNDManager::SendDNDLeave
 		message.type         = ClientMessage;
 		message.display      = *itsDisplay;
 		message.window       = itsMouseWindow;
-		message.message_type = itsDNDLeaveXAtom;
+		message.message_type = itsAtoms[ kDNDLeaveAtomIndex ];
 		message.format       = 32;
 
 		message.data.l[ kDNDLeaveWindow ] = itsDraggerWindow;
@@ -1234,7 +1212,7 @@ JXDNDManager::SendDNDDrop()
 		message.type         = ClientMessage;
 		message.display      = *itsDisplay;
 		message.window       = itsMouseWindow;
-		message.message_type = itsDNDDropXAtom;
+		message.message_type = itsAtoms[ kDNDDropAtomIndex ];
 		message.format       = 32;
 
 		message.data.l[ kDNDDropWindow    ] = itsDraggerWindow;
@@ -1258,7 +1236,7 @@ JXDNDManager::PrepareForDrop
 {
 	const JXSelectionData* data = NULL;
 	if ((itsDisplay-&gt;GetSelectionManager())-&gt;
-			GetData(itsDNDSelectionName, CurrentTime, &amp;data))
+			GetData(itsAtoms[ kDNDSelectionAtomIndex ], CurrentTime, &amp;data))
 		{
 		data-&gt;Resolve();
 		}
@@ -1297,7 +1275,7 @@ JXDNDManager::SendDNDStatus
 		message.type         = ClientMessage;
 		message.display      = *itsDisplay;
 		message.window       = itsDraggerWindow;
-		message.message_type = itsDNDStatusXAtom;
+		message.message_type = itsAtoms[ kDNDStatusAtomIndex ];
 		message.format       = 32;
 
 		message.data.l[ kDNDStatusWindow ] = itsMouseWindow;
@@ -1341,7 +1319,7 @@ JXDNDManager::SendDNDFinished()
 		message.type         = ClientMessage;
 		message.display      = *itsDisplay;
 		message.window       = itsDraggerWindow;
-		message.message_type = itsDNDFinishedXAtom;
+		message.message_type = itsAtoms[ kDNDFinishedAtomIndex ];
 		message.format       = 32;
 
 		message.data.l[ kDNDFinishedWindow ] = itsMouseWindow;
@@ -1364,25 +1342,25 @@ JXDNDManager::HandleClientMessage
 {
 	// target:  receive and process window-level enter and leave
 
-	if (clientMessage.message_type == itsDNDEnterXAtom)
+	if (clientMessage.message_type == itsAtoms[ kDNDEnterAtomIndex ])
 		{
 		HandleDNDEnter(clientMessage);
 		return kJTrue;
 		}
 
-	else if (clientMessage.message_type == itsDNDHereXAtom)
+	else if (clientMessage.message_type == itsAtoms[ kDNDHereAtomIndex ])
 		{
 		HandleDNDHere(clientMessage);
 		return kJTrue;
 		}
 
-	else if (clientMessage.message_type == itsDNDLeaveXAtom)
+	else if (clientMessage.message_type == itsAtoms[ kDNDLeaveAtomIndex ])
 		{
 		HandleDNDLeave(clientMessage);
 		return kJTrue;
 		}
 
-	else if (clientMessage.message_type == itsDNDDropXAtom)
+	else if (clientMessage.message_type == itsAtoms[ kDNDDropAtomIndex ])
 		{
 		HandleDNDDrop(clientMessage);
 		return kJTrue;
@@ -1390,7 +1368,7 @@ JXDNDManager::HandleClientMessage
 
 	// source:  clear our flag when we receive status message
 
-	else if (clientMessage.message_type == itsDNDStatusXAtom)
+	else if (clientMessage.message_type == itsAtoms[ kDNDStatusAtomIndex ])
 		{
 		HandleDNDStatus(clientMessage);
 		return kJTrue;
@@ -1399,7 +1377,7 @@ JXDNDManager::HandleClientMessage
 	// source:  ignore finished message
 	//			because JXSelectionManager rejects outdated requests
 
-	else if (clientMessage.message_type == itsDNDFinishedXAtom)
+	else if (clientMessage.message_type == itsAtoms[ kDNDFinishedAtomIndex ])
 		{
 		#if JXDND_DEBUG_MSGS
 		cout &lt;&lt; &quot;Received XdndFinished&quot; &lt;&lt; endl;
@@ -1427,7 +1405,7 @@ JXDNDManager::HandleDNDEnter
 	const XClientMessageEvent&amp; clientMessage
 	)
 {
-	assert( clientMessage.message_type == itsDNDEnterXAtom );
+	assert( clientMessage.message_type == itsAtoms[ kDNDEnterAtomIndex ] );
 
 	itsDNDVersion =
 		(clientMessage.data.l[ kDNDEnterFlags ] &gt;&gt; kDNDEnterVersionRShift) &amp;
@@ -1468,13 +1446,13 @@ JXDNDManager::HandleDNDEnter
 		ListenTo(itsDisplay);
 
 		itsDraggerTypeList-&gt;RemoveAll();
-		if (clientMessage.data.l[ kDNDEnterFlags ] &amp; kDNDEnterMoreTypesFlag != 0)
+		if ((clientMessage.data.l[ kDNDEnterFlags ] &amp; kDNDEnterMoreTypesFlag) != 0)
 			{
 			Atom actualType;
 			int actualFormat;
 			unsigned long itemCount, remainingBytes;
 			unsigned char* rawData = NULL;
-			XGetWindowProperty(*itsDisplay, itsDraggerWindow, itsDNDTypeListXAtom,
+			XGetWindowProperty(*itsDisplay, itsDraggerWindow, itsAtoms[ kDNDTypeListAtomIndex ],
 							   0, LONG_MAX, False, XA_ATOM,
 							   &amp;actualType, &amp;actualFormat,
 							   &amp;itemCount, &amp;remainingBytes, &amp;rawData);
@@ -1518,7 +1496,7 @@ JXDNDManager::HandleDNDHere
 	const XClientMessageEvent&amp; clientMessage
 	)
 {
-	assert( clientMessage.message_type == itsDNDHereXAtom );
+	assert( clientMessage.message_type == itsAtoms[ kDNDHereAtomIndex ] );
 
 	if (itsDraggerWindow != (Window) clientMessage.data.l[ kDNDHereWindow ])
 		{
@@ -1644,7 +1622,7 @@ JXDNDManager::HandleDNDLeave
 	const XClientMessageEvent&amp; clientMessage
 	)
 {
-	assert( clientMessage.message_type == itsDNDLeaveXAtom );
+	assert( clientMessage.message_type == itsAtoms[ kDNDLeaveAtomIndex ] );
 
 	if (itsDraggerWindow == (Window) clientMessage.data.l[ kDNDLeaveWindow ])
 		{
@@ -1690,7 +1668,7 @@ JXDNDManager::HandleDNDDrop
 	const XClientMessageEvent&amp; clientMessage
 	)
 {
-	assert( clientMessage.message_type == itsDNDDropXAtom );
+	assert( clientMessage.message_type == itsAtoms[ kDNDDropAtomIndex ] );
 
 	if (itsDraggerWindow == (Window) clientMessage.data.l[ kDNDDropWindow ])
 		{
@@ -1759,7 +1737,7 @@ JXDNDManager::HandleDNDStatus
 	const XClientMessageEvent&amp; clientMessage
 	)
 {
-	assert( clientMessage.message_type == itsDNDStatusXAtom );
+	assert( clientMessage.message_type == itsAtoms[ kDNDStatusAtomIndex ] );
 
 	if (itsDragger != NULL &amp;&amp;
 		itsMouseWindow == (Window) clientMessage.data.l[ kDNDStatusWindow ])
@@ -1836,7 +1814,7 @@ JXDNDManager::WaitForLastStatusMsg()
 
 	JXSelectionManager* selMgr = itsDisplay-&gt;GetSelectionManager();
 
-	Atom messageList[] = { 1, itsDNDStatusXAtom };
+	Atom messageList[] = { 1, itsAtoms[ kDNDStatusAtomIndex ] };
 
 	XEvent xEvent;
 	clock_t endTime = clock() + kWaitForLastStatusTime;
@@ -1849,7 +1827,7 @@ JXDNDManager::WaitForLastStatusMsg()
 				{
 				const JBoolean ok = HandleClientMessage(xEvent.xclient);
 				assert( ok );
-				if (xEvent.xclient.message_type == itsDNDStatusXAtom)
+				if (xEvent.xclient.message_type == itsAtoms[ kDNDStatusAtomIndex ])
 					{
 					return itsWillAcceptDropFlag;
 					}</diff>
      <filename>libjx/code/JXDNDManager.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -154,6 +154,38 @@ private:
 		kDefDNDCursorCount
 	};
 
+public:		// kAtomCount required at global scope
+
+	enum
+	{
+		kDNDSelectionAtomIndex,
+
+		kDNDProxyAtomIndex,
+		kDNDAwareAtomIndex,
+		kDNDTypeListAtomIndex,
+
+		kDNDEnterAtomIndex,
+		kDNDHereAtomIndex,
+		kDNDStatusAtomIndex,
+		kDNDLeaveAtomIndex,
+		kDNDDropAtomIndex,
+		kDNDFinishedAtomIndex,
+
+		kDNDActionCopyAtomIndex,
+		kDNDActionMoveAtomIndex,
+		kDNDActionLinkAtomIndex,
+		kDNDActionAskAtomIndex,
+		kDNDActionPrivateAtomIndex,
+		kDNDActionDirectSaveAtomIndex,
+
+		kDNDActionListAtomIndex,
+		kDNDActionDescriptionAtomIndex,
+
+		kDNDDirectSave0AtomIndex,
+
+		kAtomCount
+	};
+
 private:
 
 	JXDisplay*			itsDisplay;					// not owned
@@ -196,30 +228,7 @@ private:
 
 	JCursorIndex	itsDefDNDCursor [ kDefDNDCursorCount ];
 
-	Atom itsDNDSelectionName;
-
-	Atom itsDNDProxyXAtom;
-	Atom itsDNDAwareXAtom;
-	Atom itsDNDTypeListXAtom;
-
-	Atom itsDNDEnterXAtom;
-	Atom itsDNDHereXAtom;
-	Atom itsDNDStatusXAtom;
-	Atom itsDNDLeaveXAtom;
-	Atom itsDNDDropXAtom;
-	Atom itsDNDFinishedXAtom;
-
-	Atom itsDNDActionCopyXAtom;
-	Atom itsDNDActionMoveXAtom;
-	Atom itsDNDActionLinkXAtom;
-	Atom itsDNDActionAskXAtom;
-	Atom itsDNDActionPrivateXAtom;
-	Atom itsDNDActionDirectSaveXAtom;
-
-	Atom itsDNDActionListXAtom;
-	Atom itsDNDActionDescriptionXAtom;
-
-	Atom itsDNDDirectSave0XAtom;
+	Atom	itsAtoms[ kAtomCount ];
 
 private:
 
@@ -302,7 +311,7 @@ inline Atom
 JXDNDManager::GetDNDSelectionName()
 	const
 {
-	return itsDNDSelectionName;
+	return itsAtoms[ kDNDSelectionAtomIndex ];
 }
 
 /******************************************************************************
@@ -314,7 +323,7 @@ inline Atom
 JXDNDManager::GetDNDDirectSave0XAtom()
 	const
 {
-	return itsDNDDirectSave0XAtom;
+	return itsAtoms[ kDNDDirectSave0AtomIndex ];
 }
 
 /******************************************************************************
@@ -326,42 +335,42 @@ inline Atom
 JXDNDManager::GetDNDActionCopyXAtom()
 	const
 {
-	return itsDNDActionCopyXAtom;
+	return itsAtoms[ kDNDActionCopyAtomIndex ];
 }
 
 inline Atom
 JXDNDManager::GetDNDActionMoveXAtom()
 	const
 {
-	return itsDNDActionMoveXAtom;
+	return itsAtoms[ kDNDActionMoveAtomIndex ];
 }
 
 inline Atom
 JXDNDManager::GetDNDActionLinkXAtom()
 	const
 {
-	return itsDNDActionLinkXAtom;
+	return itsAtoms[ kDNDActionLinkAtomIndex ];
 }
 
 inline Atom
 JXDNDManager::GetDNDActionAskXAtom()
 	const
 {
-	return itsDNDActionAskXAtom;
+	return itsAtoms[ kDNDActionAskAtomIndex ];
 }
 
 inline Atom
 JXDNDManager::GetDNDActionPrivateXAtom()
 	const
 {
-	return itsDNDActionPrivateXAtom;
+	return itsAtoms[ kDNDActionPrivateAtomIndex ];
 }
 
 inline Atom
 JXDNDManager::GetDNDActionDirectSaveXAtom()
 	const
 {
-	return itsDNDActionDirectSaveXAtom;
+	return itsAtoms[ kDNDActionDirectSaveAtomIndex ];
 }
 
 /******************************************************************************</diff>
      <filename>libjx/code/JXDNDManager.h</filename>
    </modified>
    <modified>
      <diff>@@ -144,6 +144,11 @@ JXDialogDirector::Activate()
 			window-&gt;SetTransientFor(windowDir);
 			}
 
+		if (itsModalFlag)
+			{
+			window-&gt;SetWMWindowType(JXWindow::kWMDialogType);
+			}
+
 		if (itsAutoGeomFlag)
 			{
 			window-&gt;PlaceAsDialogWindow();</diff>
      <filename>libjx/code/JXDialogDirector.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -70,10 +70,27 @@
 
 const JSize kMaxSleepTime = 50;		// 0.05 seconds (in milliseconds)
 
-static const JCharacter* kWMStateXAtomName      = &quot;WM_STATE&quot;;
-static const JCharacter* kWMProtocolsXAtomName  = &quot;WM_PROTOCOLS&quot;;
-static const JCharacter* kDeleteWindowXAtomName = &quot;WM_DELETE_WINDOW&quot;;
-static const JCharacter* kSaveYourselfXAtomName = &quot;WM_SAVE_YOURSELF&quot;;
+static const JCharacter* kStandardXAtomNames[ JXDisplay::kStandardXAtomCount ] =
+{
+	&quot;WM_STATE&quot;,
+	&quot;WM_CLIENT_MACHINE&quot;,
+	&quot;WM_PROTOCOLS&quot;,
+	&quot;WM_DELETE_WINDOW&quot;,
+	&quot;WM_SAVE_YOURSELF&quot;,
+	&quot;_NET_WM_PING&quot;,
+	&quot;_NET_WM_PID&quot;,
+	&quot;_NET_WM_DESKTOP&quot;,
+	&quot;_NET_CURRENT_DESKTOP&quot;,
+
+	// http://standards.freedesktop.org/wm-spec/latest/ar01s05.html
+
+	&quot;_NET_WM_WINDOW_TYPE&quot;,
+	&quot;_NET_WM_WINDOW_TYPE_NORMAL&quot;,
+	&quot;_NET_WM_WINDOW_TYPE_DIALOG&quot;,
+	&quot;_NET_WM_WINDOW_TYPE_DROPDOWN_MENU&quot;,
+	&quot;_NET_WM_WINDOW_TYPE_POPUP_MENU&quot;,
+	&quot;_NET_WM_WINDOW_TYPE_TOOLTIP&quot;
+};
 
 // prototypes
 
@@ -166,10 +183,7 @@ JXDisplay::JXDisplay
 	itsMouseGrabber    = NULL;
 	itsKeyboardGrabber = NULL;
 
-	itsWMStateXAtom      = RegisterXAtom(kWMStateXAtomName);
-	itsWMProtocolsXAtom  = RegisterXAtom(kWMProtocolsXAtomName);
-	itsDeleteWindowXAtom = RegisterXAtom(kDeleteWindowXAtomName);
-	itsSaveYourselfXAtom = RegisterXAtom(kSaveYourselfXAtomName);
+	RegisterXAtoms(kStandardXAtomCount, kStandardXAtomNames, itsStandardXAtoms);
 
 	CreateBuiltInCursor(&quot;XC_left_ptr&quot;, XC_left_ptr);
 	CreateBuiltInCursor(&quot;XC_xterm&quot;,    XC_xterm);</diff>
      <filename>libjx/code/JXDisplay.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -38,6 +38,30 @@ class JXDisplay : virtual public JBroadcaster
 {
 public:
 
+	enum
+	{
+		kWMStateXAtomIndex,
+		kWMClientMachineXAtomIndex,
+		kWMProtocolsXAtomIndex,
+		kDeleteWindowXAtomIndex,
+		kSaveYourselfXAtomIndex,
+		kWMPingXAtomIndex,
+		kWMPidXAtomIndex,
+		kWMDesktopXAtomIndex,
+		kWMCurrentDesktopXAtomIndex,
+
+		kWMWindowTypeXAtomIndex,
+		kWMNormalTypeXAtomIndex,
+		kWMDialogTypeXAtomIndex,
+		kWMPulldownMenuTypeXAtomIndex,
+		kWMPopupMenuTypeXAtomIndex,
+		kWMTooltipTypeXAtomIndex,
+
+		kStandardXAtomCount
+	};
+
+public:
+
 	static JBoolean	Create(const JCharacter* displayName, JXDisplay** display);
 
 	virtual ~JXDisplay();
@@ -134,9 +158,16 @@ public:
 								 const Window xWindow);
 
 	Atom	GetWMProtocolsXAtom() const;
+	Atom	GetWMClientMachineXAtom() const;
 	Atom	GetDeleteWindowXAtom() const;
+	Atom	GetWMPingXAtom() const;
+	Atom	GetWMPidXAtom() const;
 	Atom	GetSaveYourselfXAtom() const;
 	Atom	GetWMStateXAtom() const;
+	Atom	GetWMDesktopXAtom() const;
+	Atom	GetWMCurrentDesktopXAtom() const;
+	Atom	GetWMWindowTypeXAtom() const;
+	Atom	GetWMWindowTypeXAtom(const JIndex type) const;
 
 	// called by Menu objects
 
@@ -172,6 +203,7 @@ public:
 	Time	GetLastEventTime() const;
 
 	Atom	RegisterXAtom(const JCharacter* name);
+	void	RegisterXAtoms(const JSize count, const JCharacter** name, Atom* atom);
 
 	JBoolean	FindXWindow(const Window xWindow, JXWindow** window) const;
 
@@ -258,12 +290,7 @@ private:
 	JXWDManager*		itsWDManager;			// can be NULL
 	JXImageCache*		itsImageCache;
 
-	// atoms used by all JXWindows
-
-	Atom	itsWMProtocolsXAtom;
-	Atom	itsDeleteWindowXAtom;
-	Atom	itsSaveYourselfXAtom;
-	Atom	itsWMStateXAtom;
+	Atom	itsStandardXAtoms[ kStandardXAtomCount ];
 
 private:
 
@@ -616,6 +643,22 @@ JXDisplay::RegisterXAtom
 }
 
 /******************************************************************************
+ RegisterXAtoms
+
+ ******************************************************************************/
+
+inline void
+JXDisplay::RegisterXAtoms
+	(
+	const JSize			count,
+	const JCharacter**	name,
+	Atom*				atom
+	)
+{
+	XInternAtoms(itsXDisplay, (char**) name, count, False, atom);
+}
+
+/******************************************************************************
  Atoms for JXWindow
 
  ******************************************************************************/
@@ -624,28 +667,80 @@ inline Atom
 JXDisplay::GetWMProtocolsXAtom()
 	const
 {
-	return itsWMProtocolsXAtom;
+	return itsStandardXAtoms[ kWMProtocolsXAtomIndex ];
+}
+
+inline Atom
+JXDisplay::GetWMClientMachineXAtom()
+	const
+{
+	return itsStandardXAtoms[ kWMClientMachineXAtomIndex ];
 }
 
 inline Atom
 JXDisplay::GetDeleteWindowXAtom()
 	const
 {
-	return itsDeleteWindowXAtom;
+	return itsStandardXAtoms[ kDeleteWindowXAtomIndex ];
+}
+
+inline Atom
+JXDisplay::GetWMPingXAtom()
+	const
+{
+	return itsStandardXAtoms[ kWMPingXAtomIndex ];
+}
+
+inline Atom
+JXDisplay::GetWMPidXAtom()
+	const
+{
+	return itsStandardXAtoms[ kWMPidXAtomIndex ];
 }
 
 inline Atom
 JXDisplay::GetSaveYourselfXAtom()
 	const
 {
-	return itsSaveYourselfXAtom;
+	return itsStandardXAtoms[ kSaveYourselfXAtomIndex ];
 }
 
 inline Atom
 JXDisplay::GetWMStateXAtom()
 	const
 {
-	return itsWMStateXAtom;
+	return itsStandardXAtoms[ kWMStateXAtomIndex ];
+}
+
+inline Atom
+JXDisplay::GetWMDesktopXAtom()
+	const
+{
+	return itsStandardXAtoms[ kWMDesktopXAtomIndex ];
+}
+
+inline Atom
+JXDisplay::GetWMCurrentDesktopXAtom()
+	const
+{
+	return itsStandardXAtoms[ kWMCurrentDesktopXAtomIndex ];
+}
+
+inline Atom
+JXDisplay::GetWMWindowTypeXAtom()
+	const
+{
+	return itsStandardXAtoms[ kWMWindowTypeXAtomIndex ];
+}
+
+inline Atom
+JXDisplay::GetWMWindowTypeXAtom
+	(
+	const JIndex type
+	)
+	const
+{
+	return itsStandardXAtoms[ kWMWindowTypeXAtomIndex + type ];
 }
 
 /******************************************************************************</diff>
      <filename>libjx/code/JXDisplay.h</filename>
    </modified>
    <modified>
      <diff>@@ -28,8 +28,11 @@ const JFileVersion kCurrentSetupVersion = 3;
 	// version  2 saves JXTabGroup data
 	// version  1 saves itsWindowTypeMap
 
-static const JCharacter* kDNDMinSizeAtomName = &quot;MinSize::JXDockDragData&quot;;
-static const JCharacter* kDNDWindowAtomName  = &quot;Window::JXDockDragData&quot;;
+static const JCharacter* kAtomNames[ JXDockManager::kAtomCount ] =
+{
+	&quot;MinSize::JXDockDragData&quot;,
+	&quot;Window::JXDockDragData&quot;
+};
 
 // string ID's
 
@@ -63,8 +66,7 @@ JXDockManager::JXDockManager
 	itsWindowTypeMap = new JStringMap&lt;JIndex&gt;;
 	assert( itsWindowTypeMap != NULL );
 
-	itsDNDMinSizeAtom = display-&gt;RegisterXAtom(kDNDMinSizeAtomName);
-	itsDNDWindowAtom  = display-&gt;RegisterXAtom(kDNDWindowAtomName);
+	display-&gt;RegisterXAtoms(kAtomCount, kAtomNames, itsAtoms);
 
 	JXSetDockManager(this);
 }</diff>
      <filename>libjx/code/JXDockManager.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -8,10 +8,10 @@
 #ifndef _H_JXDockManager
 #define _H_JXDockManager
 
-#if !defined _J_UNIX &amp;&amp; !defined ACE_LACKS_PRAGMA_ONCE
-#pragma once
-#endif
-
+#if !defined _J_UNIX &amp;&amp; !defined ACE_LACKS_PRAGMA_ONCE
+#pragma once
+#endif
+
 #include &lt;JXDirector.h&gt;
 #include &lt;JPrefObject.h&gt;
 #include &lt;JStringMap.h&gt;
@@ -80,6 +80,16 @@ protected:
 	virtual void	ReadPrefs(istream&amp; input);
 	virtual void	WritePrefs(ostream&amp; output) const;
 
+public:		// kAtomCount required at global scope
+
+	enum
+	{
+		kDNDMinSizeAtomIndex,
+		kDNDWindowAtomIndex,
+
+		kAtomCount
+	};
+
 private:
 
 	JXDisplay*					itsDisplay;
@@ -90,8 +100,7 @@ private:
 	JIndex						itsNextDockID;
 	JBoolean					itsIsReadingSetupFlag;
 	CloseDockMode				itsCloseDockMode;
-	Atom						itsDNDMinSizeAtom;
-	Atom						itsDNDWindowAtom;
+	Atom						itsAtoms[ kAtomCount ];
 
 private:
 
@@ -141,14 +150,14 @@ inline Atom
 JXDockManager::GetDNDMinSizeAtom()
 	const
 {
-	return itsDNDMinSizeAtom;
+	return itsAtoms[ kDNDMinSizeAtomIndex ];
 }
 
 inline Atom
 JXDockManager::GetDNDWindowAtom()
 	const
 {
-	return itsDNDWindowAtom;
+	return itsAtoms[ kDNDWindowAtomIndex ];
 }
 
 /******************************************************************************</diff>
      <filename>libjx/code/JXDockManager.h</filename>
    </modified>
    <modified>
      <diff>@@ -12,6 +12,7 @@
 #include &lt;JXWindow.h&gt;
 #include &lt;JXTextButton.h&gt;
 #include &lt;JXIntegerInput.h&gt;
+#include &lt;JXTextCheckbox.h&gt;
 #include &lt;JXStaticText.h&gt;
 #include &lt;jGlobals.h&gt;
 #include &lt;jAssert.h&gt;
@@ -25,13 +26,14 @@ JXGoToLineDialog::JXGoToLineDialog
 	(
 	JXDirector*		supervisor,
 	const JIndex	lineIndex,
-	const JIndex	maxLine
+	const JIndex	maxLine,
+	const JBoolean	physicalLineIndexFlag
 	)
 	:
 	JXDialogDirector(supervisor, kJTrue),
-	itsMaxLineCount( maxLine )
+	itsMaxLineCount(maxLine)
 {
-	BuildWindow(lineIndex);
+	BuildWindow(lineIndex, physicalLineIndexFlag);
 }
 
 /******************************************************************************
@@ -51,24 +53,25 @@ JXGoToLineDialog::~JXGoToLineDialog()
 void
 JXGoToLineDialog::BuildWindow
 	(
-	const JIndex lineIndex
+	const JIndex	lineIndex,
+	const JBoolean	physicalLineIndexFlag
 	)
 {
 // begin JXLayout
 
-    JXWindow* window = new JXWindow(this, 190,90, &quot;&quot;);
+    JXWindow* window = new JXWindow(this, 190,120, &quot;&quot;);
     assert( window != NULL );
     SetWindow(window);
 
     JXTextButton* okButton =
         new JXTextButton(JGetString(&quot;okButton::JXGoToLineDialog::JXLayout&quot;), window,
-                    JXWidget::kFixedRight, JXWidget::kFixedBottom, 109,59, 62,22);
+                    JXWidget::kFixedRight, JXWidget::kFixedBottom, 109,89, 62,22);
     assert( okButton != NULL );
     okButton-&gt;SetShortcuts(JGetString(&quot;okButton::JXGoToLineDialog::shortcuts::JXLayout&quot;));
 
     JXTextButton* cancelButton =
         new JXTextButton(JGetString(&quot;cancelButton::JXGoToLineDialog::JXLayout&quot;), window,
-                    JXWidget::kFixedLeft, JXWidget::kFixedBottom, 20,60, 60,20);
+                    JXWidget::kFixedLeft, JXWidget::kFixedBottom, 20,90, 60,20);
     assert( cancelButton != NULL );
 
     itsLineNumber =
@@ -81,6 +84,12 @@ JXGoToLineDialog::BuildWindow
                     JXWidget::kFixedLeft, JXWidget::kFixedTop, 40,20, 70,20);
     assert( obj1_JXLayout != NULL );
 
+    itsPhysicalLineIndexCB =
+        new JXTextCheckbox(JGetString(&quot;itsPhysicalLineIndexCB::JXGoToLineDialog::JXLayout&quot;), window,
+                    JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,50, 150,20);
+    assert( itsPhysicalLineIndexCB != NULL );
+    itsPhysicalLineIndexCB-&gt;SetShortcuts(JGetString(&quot;itsPhysicalLineIndexCB::JXGoToLineDialog::shortcuts::JXLayout&quot;));
+
 // end JXLayout
 
 	window-&gt;SetTitle(&quot;Go to line&quot;);
@@ -88,6 +97,8 @@ JXGoToLineDialog::BuildWindow
 
 	itsLineNumber-&gt;SetValue(lineIndex);
 	itsLineNumber-&gt;SetLowerLimit(1);
+
+	itsPhysicalLineIndexCB-&gt;SetState(physicalLineIndexFlag);
 }
 
 /******************************************************************************
@@ -96,9 +107,14 @@ JXGoToLineDialog::BuildWindow
  ******************************************************************************/
 
 JIndex
-JXGoToLineDialog::GetLineIndex()
+JXGoToLineDialog::GetLineIndex
+	(
+	JBoolean* physicalLineIndexFlag
+	)
 	const
 {
+	*physicalLineIndexFlag = itsPhysicalLineIndexCB-&gt;IsChecked();
+
 	JInteger lineIndex;
 	const JBoolean ok = itsLineNumber-&gt;GetValue(&amp;lineIndex);
 	assert( ok );</diff>
      <filename>libjx/code/JXGoToLineDialog.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -17,17 +17,19 @@
 #include &lt;JXDialogDirector.h&gt;
 
 class JXIntegerInput;
+class JXTextCheckbox;
 
 class JXGoToLineDialog : public JXDialogDirector
 {
 public:
 
 	JXGoToLineDialog(JXDirector* supervisor,
-					 const JIndex lineIndex, const JIndex maxLine);
+					 const JIndex lineIndex, const JIndex maxLine,
+					 const JBoolean physicalLineIndexFlag = kJFalse);
 
 	virtual ~JXGoToLineDialog();
 
-	JIndex	GetLineIndex() const;
+	JIndex	GetLineIndex(JBoolean* physicalLineIndexFlag) const;
 
 private:
 
@@ -36,12 +38,13 @@ private:
 // begin JXLayout
 
     JXIntegerInput* itsLineNumber;
+    JXTextCheckbox* itsPhysicalLineIndexCB;
 
 // end JXLayout
 
 private:
 
-	void	BuildWindow(const JIndex lineIndex);
+	void	BuildWindow(const JIndex lineIndex, const JBoolean physicalLineIndexFlag);
 
 	// not allowed
 </diff>
      <filename>libjx/code/JXGoToLineDialog.h</filename>
    </modified>
    <modified>
      <diff>@@ -85,6 +85,7 @@ JXHintDirector::BuildWindow
 	JXWindow* window = new JXWindow(this, 10,10, &quot;&quot;, kJFalse, colormap, kJTrue);
     assert( window != NULL );
     SetWindow(window);
+    window-&gt;SetWMWindowType(JXWindow::kWMTooltipType);
 
 	JXBorderRect* border =
 		new JXBorderRect(window, JXWidget::kHElastic, JXWidget::kVElastic,</diff>
      <filename>libjx/code/JXHintDirector.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -21,10 +21,13 @@
 #include &lt;stdio.h&gt;
 #include &lt;jAssert.h&gt;
 
-static const JCharacter* kXPMXAtomName  = &quot;image/xpm&quot;;
-static const JCharacter* kGIFXAtomName  = &quot;image/gif&quot;;
-static const JCharacter* kPNGXAtomName  = &quot;image/png&quot;;
-static const JCharacter* kJPEGXAtomName = &quot;image/jpeg&quot;;
+static const JCharacter* kAtomNames[ JXImageSelection::kAtomCount ] =
+{
+	&quot;image/xpm&quot;,
+	&quot;image/gif&quot;,
+	&quot;image/png&quot;,
+	&quot;image/jpeg&quot;
+};
 
 /******************************************************************************
  Constructor
@@ -85,12 +88,19 @@ JXImageSelection::AddTypes
 	const Atom selectionName
 	)
 {
-	itsXPMXAtom = AddType(kXPMXAtomName);
+	(GetDisplay())-&gt;RegisterXAtoms(kAtomCount, kAtomNames, itsAtoms);
+
+	itsXPMAtom = itsAtoms[ kXPMAtomIndex ];
+	AddType(itsXPMAtom);
 
 	#ifdef _J_HAS_GD
-	itsGIFXAtom = AddType(kGIFXAtomName);
-	itsPNGXAtom = AddType(kPNGXAtomName);
-	itsJPEGXAtom = AddType(kJPEGXAtomName);
+	itsGIFAtom = itsAtoms[ kGIFAtomIndex ];
+	AddType(itsXPMAtom);
+
+	itsPNGAtom = itsAtoms[ kPNGAtomIndex ];
+	AddType(itsXPMAtom);
+
+	itsJPEGAtom = itsAtoms[ kJPEGAtomIndex ];
 	#endif
 }
 
@@ -168,19 +178,19 @@ JXImageSelection::ConvertData
 		}
 
 	JError err = JUnknownError(1);
-	if (requestType == itsXPMXAtom)
+	if (requestType == itsXPMAtom)
 		{
 		err = itsImage-&gt;WriteXPM(fileName);
 		}
-	else if (requestType == itsGIFXAtom)
+	else if (requestType == itsGIFAtom)
 		{
 		err = itsImage-&gt;WriteGIF(fileName, kJFalse);	// if too many colors, use PNG
 		}
-	else if (requestType == itsPNGXAtom)
+	else if (requestType == itsPNGAtom)
 		{
 		err = itsImage-&gt;WritePNG(fileName);
 		}
-	else if (requestType == itsJPEGXAtom)
+	else if (requestType == itsJPEGAtom)
 		{
 		err = itsImage-&gt;WriteJPEG(fileName);
 		}
@@ -237,25 +247,25 @@ JXImageSelection::ReceiveGoingAway
 const JCharacter*
 JXImageSelection::GetXPMXAtomName()
 {
-	return kXPMXAtomName;
+	return kAtomNames[ kXPMAtomIndex ];
 }
 
 const JCharacter*
 JXImageSelection::GetGIFXAtomName()
 {
-	return kGIFXAtomName;
+	return kAtomNames[ kGIFAtomIndex ];
 }
 
 const JCharacter*
 JXImageSelection::GetPNGXAtomName()
 {
-	return kPNGXAtomName;
+	return kAtomNames[ kPNGAtomIndex ];
 }
 
 const JCharacter*
 JXImageSelection::GetJPEGXAtomName()
 {
-	return kJPEGXAtomName;
+	return kAtomNames[ kJPEGAtomIndex ];
 }
 
 /******************************************************************************
@@ -288,11 +298,9 @@ JXImageSelection::GetImage
 	const JBoolean		allowApproxColors
 	)
 {
-	JXDisplay* display   = colormap-&gt;GetDisplay();
-	const Atom xpmXAtom  = display-&gt;RegisterXAtom(kXPMXAtomName);
-	const Atom gifXAtom  = display-&gt;RegisterXAtom(kGIFXAtomName);
-	const Atom pngXAtom  = display-&gt;RegisterXAtom(kPNGXAtomName);
-	const Atom jpegXAtom = display-&gt;RegisterXAtom(kJPEGXAtomName);
+	JXDisplay* display = colormap-&gt;GetDisplay();
+	Atom atoms[ kAtomCount ];
+	display-&gt;RegisterXAtoms(kAtomCount, kAtomNames, atoms);
 
 	JArray&lt;Atom&gt; typeList;
 	if (selMgr-&gt;GetAvailableTypes(selectionName, time, &amp;typeList))
@@ -303,10 +311,10 @@ JXImageSelection::GetImage
 		for (JIndex i=1; i&lt;=count; i++)
 			{
 			const Atom type = typeList.GetElement(i);
-			xpm  = JI2B( xpm  || type == xpmXAtom  );
-			gif  = JI2B( gif  || type == gifXAtom  );
-			png  = JI2B( png  || type == pngXAtom  );
-			jpeg = JI2B( jpeg || type == jpegXAtom );
+			xpm  = JI2B( xpm  || type == atoms[ kXPMAtomIndex ]  );
+			gif  = JI2B( gif  || type == atoms[ kGIFAtomIndex ]  );
+			png  = JI2B( png  || type == atoms[ kPNGAtomIndex ]  );
+			jpeg = JI2B( jpeg || type == atoms[ kJPEGAtomIndex ] );
 			}
 
 		while (xpm || gif || png || jpeg)
@@ -315,22 +323,22 @@ JXImageSelection::GetImage
 			if (png)
 				{
 				png  = kJFalse;
-				type = pngXAtom;
+				type = atoms[ kPNGAtomIndex ];
 				}
 			else if (gif)
 				{
 				gif  = kJFalse;
-				type = gifXAtom;
+				type = atoms[ kGIFAtomIndex ];
 				}
 			else if (xpm)
 				{
 				xpm  = kJFalse;
-				type = xpmXAtom;
+				type = atoms[ kXPMAtomIndex ];
 				}
 			else if (jpeg)		// JPEG is lossy
 				{
 				jpeg = kJFalse;
-				type = jpegXAtom;
+				type = atoms[ kJPEGAtomIndex ];
 				}
 
 			Atom returnType;</diff>
      <filename>libjx/code/JXImageSelection.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -8,10 +8,10 @@
 #ifndef _H_JXImageSelection
 #define _H_JXImageSelection
 
-#if !defined _J_UNIX &amp;&amp; !defined ACE_LACKS_PRAGMA_ONCE
-#pragma once
-#endif
-
+#if !defined _J_UNIX &amp;&amp; !defined ACE_LACKS_PRAGMA_ONCE
+#pragma once
+#endif
+
 #include &lt;JXSelectionData.h&gt;
 
 class JXImage;
@@ -54,13 +54,26 @@ protected:
 
 	virtual void	ReceiveGoingAway(JBroadcaster* sender);
 
+public:		// kAtomCount required at global scope
+
+	enum
+	{
+		kXPMAtomIndex,
+		kGIFAtomIndex,
+		kPNGAtomIndex,
+		kJPEGAtomIndex,
+
+		kAtomCount
+	};
+
 private:
 
 	JXImage*	itsImage;		// NULL until Resolve()
-	Atom		itsXPMXAtom;
-	Atom		itsGIFXAtom;
-	Atom		itsPNGXAtom;
-	Atom		itsJPEGXAtom;
+	Atom		itsAtoms[ kAtomCount ];
+	Atom		itsXPMAtom;
+	Atom		itsGIFAtom;
+	Atom		itsPNGAtom;
+	Atom		itsJPEGAtom;
 
 private:
 </diff>
      <filename>libjx/code/JXImageSelection.h</filename>
    </modified>
    <modified>
      <diff>@@ -51,6 +51,7 @@ static const char* kCurrentJXLibVersionStr = &quot;2.5.0&quot;;
 //		Ctrl-Page-Up/Down cycles through docked windows in a pane.
 //		Global JX preference to have focus follow the mouse between docked windows.
 //		Updated placement code to handle latest curveball from OS X.
+//		Supports _NET_WM_PING and _NET_WM_WINDOW_TYPE protocols.
 //	JXProgressDisplay:
 //		Updated ProcessBeginning() so it hides the unused widgets and
 //			initializes the visible ones.  (What took me so long?)
@@ -94,6 +95,8 @@ static const char* kCurrentJXLibVersionStr = &quot;2.5.0&quot;;
 //	Created JXImageCache to store mapping between JXPM and JXImage*.
 //	JXDisplay:
 //		Added GetImageCache().
+//		Added RegisterXAtoms().  Application startup over a network is now
+//			faster because individual RegisterXAtom() calls have been combined.
 //	JXTextMenu:
 //		Uses JXImageCache to minimize creation of JXImages.
 //	JXContainer:
@@ -140,6 +143,13 @@ static const char* kCurrentJXLibVersionStr = &quot;2.5.0&quot;;
 //			time of insertion is no guarantee of existence later on.  This
 //			also simplifies the usage, because fullNameIndex will always be
 //			valid.
+//	JXGoToLineDialog:
+//		Added option to enter physical line number.
+//	jXUtil:
+//		Fixed JXUnpackStrings to ignore trailing separator.
+//	JXSelectionManager:
+//		Work-around for broken XDND file implementations that do not include
+//			the host name in the URL's.
 
 // version 2.5.0:
 //	*** All egcs thunks hacks have been removed.</diff>
      <filename>libjx/code/JXLibVersion.h</filename>
    </modified>
    <modified>
      <diff>@@ -1084,6 +1084,12 @@ JXMenu::Open
 
 	itsMenuDirector = CreateMenuWindow((GetWindow())-&gt;GetDirector());
 	itsMenuDirector-&gt;BuildWindow(leftPtR, rightPtR, frameHeight);
+
+	if (itsIsHiddenPopupMenuFlag)
+		{
+		(itsMenuDirector-&gt;GetWindow())-&gt;SetWMWindowType(JXWindow::kWMPopupMenuType);
+		}
+
 	itsMenuDirector-&gt;Activate();
 	itsMenuDirector-&gt;GrabKeyboard();
 	menuManager-&gt;MenuOpened(this, itsMenuDirector-&gt;GetWindow());</diff>
      <filename>libjx/code/JXMenu.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -1100,11 +1100,15 @@ JXSearchTextDialog::WriteSetup
 
  ******************************************************************************/
 
-static const JCharacter* kXSearchSelectionXAtomName = &quot;XsearchSelection&quot;;
-static const JCharacter* kXSearchWindowsXAtomName   = &quot;XsearchWindows&quot;;
-static const JCharacter* kXSearchVersionXAtomName   = &quot;XsearchVersion&quot;;
-static const JCharacter* kXSearchDataV1XAtomName    = &quot;XsearchDataV1&quot;;
-static const JCharacter* kXSearchExtraTag           = &quot;JX_Application_Framework&quot;;
+static const JCharacter* kAtomNames[ JXSearchTextDialog::kAtomCount ] =
+{
+	&quot;XsearchSelection&quot;,
+	&quot;XsearchWindows&quot;,
+	&quot;XsearchVersion&quot;,
+	&quot;XsearchDataV1&quot;
+};
+
+static const JCharacter* kXSearchExtraTag = &quot;JX_Application_Framework&quot;;
 
 class JXSearchSelection : public JXSelectionData
 {
@@ -1132,10 +1136,7 @@ JXSearchTextDialog::InitXSearch()
 	JXDisplay* display      = GetDisplay();
 	const Window rootWindow = display-&gt;GetRootWindow();
 
-	itsXSearchSelectionName = display-&gt;RegisterXAtom(kXSearchSelectionXAtomName);
-	itsXSearchWindowsXAtom  = display-&gt;RegisterXAtom(kXSearchWindowsXAtomName);
-	itsXSearchVersionXAtom  = display-&gt;RegisterXAtom(kXSearchVersionXAtomName);
-	itsXSearchDataXAtom[0]  = display-&gt;RegisterXAtom(kXSearchDataV1XAtomName);
+	display-&gt;RegisterXAtoms(kAtomCount, kAtomNames, itsAtoms);
 
 	itsVersionWindow = None;
 	itsDataWindow    = None;
@@ -1166,7 +1167,7 @@ JXSearchTextDialog::InitXSearch()
 	int actualFormat;
 	unsigned long itemCount, remainingBytes;
 	unsigned char* data = NULL;
-	XGetWindowProperty(*display, rootWindow, itsXSearchWindowsXAtom,
+	XGetWindowProperty(*display, rootWindow, itsAtoms[ kXSearchWindowsAtomIndex ],
 					   0, 2, False, XA_WINDOW,
 					   &amp;actualType, &amp;actualFormat,
 					   &amp;itemCount, &amp;remainingBytes, &amp;data);
@@ -1184,7 +1185,7 @@ JXSearchTextDialog::InitXSearch()
 		{
 		const Window newData[2] = { itsVersionWindow, itsDataWindow };
 		XChangeProperty(*display, rootWindow,
-						itsXSearchWindowsXAtom, XA_WINDOW, 32,
+						itsAtoms[ kXSearchWindowsAtomIndex ], XA_WINDOW, 32,
 						PropModeReplace,
 						(unsigned char*) newData, 2);
 
@@ -1221,7 +1222,7 @@ JXSearchTextDialog::GetXSearch()
 	int actualFormat;
 	unsigned long itemCount, remainingBytes;
 	unsigned char* data = NULL;
-	XGetWindowProperty(*display, itsVersionWindow, itsXSearchVersionXAtom,
+	XGetWindowProperty(*display, itsVersionWindow, itsAtoms[ kXSearchVersionAtomIndex ],
 					   0, 1, False, XA_ATOM,
 					   &amp;actualType, &amp;actualFormat,
 					   &amp;itemCount, &amp;remainingBytes, &amp;data);
@@ -1232,7 +1233,7 @@ JXSearchTextDialog::GetXSearch()
 		const Atom vers          = JMin(maxSourceVers, (Atom) kCurrentXSearchVersion);
 		XFree(data);
 
-		const Atom requestType = itsXSearchDataXAtom [ vers-1 ];
+		const Atom requestType = itsAtoms[ kXSearchDataV1AtomIndex + (vers-1) ];
 		XGetWindowProperty(*display, itsDataWindow, requestType,
 						   0, LONG_MAX, False, plainTextAtom,
 						   &amp;actualType, &amp;actualFormat,
@@ -1282,7 +1283,7 @@ JXSearchTextDialog::SetXSearch
 
 	JXSearchSelection* selData = new JXSearchSelection(GetDisplay());
 	assert( selData != NULL );
-	if (!selMgr-&gt;SetData(itsXSearchSelectionName, selData))
+	if (!selMgr-&gt;SetData(itsAtoms[ kXSearchSelectionAtomIndex ], selData))
 		{
 		if (grabServer)
 			{
@@ -1298,7 +1299,7 @@ JXSearchTextDialog::SetXSearch
 	const std::string s = dataV1.str();
 
 	XChangeProperty(*display, itsDataWindow,
-					itsXSearchDataXAtom[0], plainTextAtom, 8,
+					itsAtoms[ kXSearchDataV1AtomIndex ], plainTextAtom, 8,
 					PropModeReplace,
 					(unsigned char*) s.c_str(), s.length());
 
@@ -1306,7 +1307,7 @@ JXSearchTextDialog::SetXSearch
 
 	const Atom vers = kCurrentXSearchVersion;
 	XChangeProperty(*display, itsVersionWindow,
-					itsXSearchVersionXAtom, XA_ATOM, 32,
+					itsAtoms[ kXSearchVersionAtomIndex ], XA_ATOM, 32,
 					PropModeReplace,
 					(unsigned char*) &amp;vers, 1);
 
@@ -1463,11 +1464,11 @@ JXSearchTextDialog::ReceiveWithFeedback
 		const XEvent&amp; event = info-&gt;GetXEvent();
 		if (event.type             == PropertyNotify &amp;&amp;
 			event.xproperty.window == itsVersionWindow &amp;&amp;
-			event.xproperty.atom   == itsXSearchVersionXAtom &amp;&amp;
+			event.xproperty.atom   == itsAtoms[ kXSearchVersionAtomIndex ] &amp;&amp;
 			event.xproperty.state  == PropertyNewValue)
 			{
 			if (!((GetDisplay())-&gt;GetSelectionManager())-&gt;
-					OwnsSelection(itsXSearchSelectionName))
+					OwnsSelection(itsAtoms[ kXSearchSelectionAtomIndex ]))
 				{
 				GetXSearch();
 				}</diff>
      <filename>libjx/code/JXSearchTextDialog.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -107,6 +107,18 @@ protected:
 	virtual void	Receive(JBroadcaster* sender, const Message&amp; message);
 	virtual void	ReceiveWithFeedback(JBroadcaster* sender, Message* message);
 
+public:		// kAtomCount required at global scope
+
+	enum
+	{
+		kXSearchSelectionAtomIndex,
+		kXSearchWindowsAtomIndex,
+		kXSearchVersionAtomIndex,
+		kXSearchDataV1AtomIndex,
+
+		kAtomCount
+	};
+
 private:
 
 	JXTEBase*			itsTE;					// can be NULL; not owned
@@ -114,13 +126,7 @@ private:
 	JXTimerTask*		itsUpdateTask;
 
 	const JCharacter*	itsSearchTextHelpName;
-
-	// Xsearch protocol
-
-	Atom	itsXSearchSelectionName;
-	Atom	itsXSearchWindowsXAtom;
-	Atom	itsXSearchVersionXAtom;
-	Atom	itsXSearchDataXAtom [ kCurrentXSearchVersion ];
+	Atom				itsAtoms[ kAtomCount ];
 
 	Window	itsVersionWindow;		// None if init failed
 	Window	itsDataWindow;			// None if init failed</diff>
      <filename>libjx/code/JXSearchTextDialog.h</filename>
    </modified>
    <modified>
      <diff>@@ -23,6 +23,7 @@
 #include &lt;JXWindow.h&gt;
 #include &lt;JXWidget.h&gt;
 #include &lt;jXGlobals.h&gt;
+#include &lt;jXUtil.h&gt;
 #include &lt;jTime.h&gt;
 #include &lt;string.h&gt;
 #include &lt;stdlib.h&gt;
@@ -39,18 +40,21 @@ const Time kHistoryInterval = 60000;	// 1 minute (milliseconds)
 const clock_t kWaitForSelectionTime = 5 * CLOCKS_PER_SEC;
 const clock_t kUserBoredWaitingTime = 1 * CLOCKS_PER_SEC;
 
-static const JCharacter* kSWPXAtomName             = &quot;JXSelectionWindowProperty&quot;;
-static const JCharacter* kIncrementalXAtomName     = &quot;INCR&quot;;
-static const JCharacter* kTargetsXAtomName         = &quot;TARGETS&quot;;
-static const JCharacter* kTimeStampXAtomName       = &quot;TIMESTAMP&quot;;
-static const JCharacter* kTextXAtomName            = &quot;TEXT&quot;;
-static const JCharacter* kCompoundTextXAtomName    = &quot;COMPOUND_TEXT&quot;;
-static const JCharacter* kMultipleXAtomName        = &quot;MULTIPLE&quot;;
-static const JCharacter* kMimePlainTextXAtomName   = &quot;text/plain&quot;;
-static const JCharacter* kURLXAtomName             = &quot;text/uri-list&quot;;
-static const JCharacter* kDeleteSelectionXAtomName = &quot;DELETE&quot;;
-static const JCharacter* kNULLXAtomName            = &quot;NULL&quot;;
-static const JCharacter* kGnomeClipboardXAtomName  = &quot;CLIPBOARD&quot;;
+static const JCharacter* kAtomNames[ JXSelectionManager::kAtomCount ] =
+{
+	&quot;JXSelectionWindowProperty&quot;,	// for receiving selection data
+	&quot;INCR&quot;,							// for sending data incrementally
+	&quot;TARGETS&quot;,						// returns type XA_ATOM
+	&quot;TIMESTAMP&quot;,					// returns type XA_INTEGER
+	&quot;TEXT&quot;,							//  8-bit characters
+	&quot;COMPOUND_TEXT&quot;,				// 16-bit characters
+	&quot;MULTIPLE&quot;,						// several formats at once
+	&quot;text/plain&quot;,
+	&quot;text/uri-list&quot;,
+	&quot;DELETE&quot;,						// returns type &quot;NULL&quot;
+	&quot;NULL&quot;,
+	&quot;CLIPBOARD&quot;
+};
 
 /******************************************************************************
  Constructor
@@ -87,7 +91,7 @@ JXSelectionManager::JXSelectionManager
 
 	// create required X atoms
 
-	JString mimePlainTextXAtomName = kMimePlainTextXAtomName;
+	JString mimePlainTextXAtomName = kAtomNames[ kMimePlainTextAtomIndex ];
 	JIndex charSetIndex;
 	if (JXGetLatinCharacterSetIndex(&amp;charSetIndex) &amp;&amp; charSetIndex != 1)
 		{
@@ -95,21 +99,11 @@ JXSelectionManager::JXSelectionManager
 		mimePlainTextXAtomName += JString(charSetIndex, 0);
 		}
 
-	itsSelectionWindPropXAtom = itsDisplay-&gt;RegisterXAtom(kSWPXAtomName);
-	itsIncrementalSendXAtom   = itsDisplay-&gt;RegisterXAtom(kIncrementalXAtomName);
-
-	itsTargetsXAtom           = itsDisplay-&gt;RegisterXAtom(kTargetsXAtomName);
-	itsTimeStampXAtom         = itsDisplay-&gt;RegisterXAtom(kTimeStampXAtomName);
-	itsTextXAtom              = itsDisplay-&gt;RegisterXAtom(kTextXAtomName);
-	itsCompoundTextXAtom      = itsDisplay-&gt;RegisterXAtom(kCompoundTextXAtomName);
-	itsMultipleXAtom          = itsDisplay-&gt;RegisterXAtom(kMultipleXAtomName);
-	itsMimePlainTextXAtom     = itsDisplay-&gt;RegisterXAtom(mimePlainTextXAtomName);
-	itsURLXAtom               = itsDisplay-&gt;RegisterXAtom(kURLXAtomName);
+	const JCharacter* atomNames[ JXSelectionManager::kAtomCount ];
+	memcpy(atomNames, kAtomNames, sizeof(kAtomNames));
+	atomNames[ kMimePlainTextAtomIndex ] = mimePlainTextXAtomName;
 
-	itsDeleteSelectionXAtom   = itsDisplay-&gt;RegisterXAtom(kDeleteSelectionXAtomName);
-	itsNULLXAtom              = itsDisplay-&gt;RegisterXAtom(kNULLXAtomName);
-
-	itsGnomeClipboardName     = itsDisplay-&gt;RegisterXAtom(kGnomeClipboardXAtomName);
+	itsDisplay-&gt;RegisterXAtoms(kAtomCount, atomNames, itsAtoms);
 }
 
 /******************************************************************************
@@ -153,13 +147,13 @@ JXSelectionManager::GetAvailableTypes
 	typeList-&gt;RemoveAll();
 
 	XSelectionEvent selEvent;
-	if (RequestData(selectionName, time, itsTargetsXAtom, &amp;selEvent))
+	if (RequestData(selectionName, time, itsAtoms[ kTargetsAtomIndex ], &amp;selEvent))
 		{
 		Atom actualType;
 		int actualFormat;
 		unsigned long itemCount, remainingBytes;
 		unsigned char* data = NULL;
-		XGetWindowProperty(*itsDisplay, itsDataWindow, itsSelectionWindPropXAtom,
+		XGetWindowProperty(*itsDisplay, itsDataWindow, itsAtoms[ kSelectionWindPropAtomIndex ],
 						   0, LONG_MAX, True, XA_ATOM,
 						   &amp;actualType, &amp;actualFormat,
 						   &amp;itemCount, &amp;remainingBytes, &amp;data);
@@ -256,6 +250,8 @@ JXSelectionManager::GetData
 	*dataLength = 0;
 	*delMethod  = kXFree;
 
+	JBoolean success = kJFalse;
+
 	XSelectionEvent selEvent;
 	if (RequestData(selectionName, time, requestType, &amp;selEvent))
 		{
@@ -267,7 +263,7 @@ JXSelectionManager::GetData
 		// before initiating the incremental transfer.
 		{
 		XEvent xEvent;
-		XID checkIfEventData[] = { itsDataWindow, itsSelectionWindPropXAtom };
+		XID checkIfEventData[] = { itsDataWindow, itsAtoms[ kSelectionWindPropAtomIndex ] };
 		while (XCheckIfEvent(*itsDisplay, &amp;xEvent, GetNextNewPropertyEvent,
 							 reinterpret_cast&lt;char*&gt;(checkIfEventData)))
 			{
@@ -279,33 +275,43 @@ JXSelectionManager::GetData
 
 		int actualFormat;
 		unsigned long itemCount, remainingBytes;
-		XGetWindowProperty(*itsDisplay, itsDataWindow, itsSelectionWindPropXAtom,
+		XGetWindowProperty(*itsDisplay, itsDataWindow, itsAtoms[ kSelectionWindPropAtomIndex ],
 						   0, LONG_MAX, True, AnyPropertyType,
 						   returnType, &amp;actualFormat,
 						   &amp;itemCount, &amp;remainingBytes, data);
 
-		if (*returnType == itsIncrementalSendXAtom)
+		if (*returnType == itsAtoms[ kIncrementalSendAtomIndex ])
 			{
 			XFree(*data);
-			return ReceiveDataIncr(selectionName, returnType,
-								   data, dataLength, delMethod);
+			success = ReceiveDataIncr(selectionName, returnType,
+									  data, dataLength, delMethod);
 			}
 		else if (*returnType != None &amp;&amp; remainingBytes == 0)
 			{
 			*dataLength = itemCount * actualFormat/8;
-			return kJTrue;
+			success = kJTrue;
 			}
 		else
 			{
 			XFree(*data);
 			*data = NULL;
-			return kJFalse;
 			}
 		}
-	else
+
+	if (success &amp;&amp; *returnType == itsAtoms[ kURLAtomIndex ])
 		{
-		return kJFalse;
+		const Window srcWindow = XGetSelectionOwner(*itsDisplay, selectionName);
+		JString newData;
+		if (JXFixBrokenURLs((char*) *data, *dataLength, itsDisplay, srcWindow, &amp;newData))
+			{
+			XFree(*data);
+			*data = (unsigned char*) malloc(newData.GetLength()+1);
+			memcpy(*data, newData.GetCString(), newData.GetLength()+1);
+			*dataLength = newData.GetLength();
+			}
 		}
+
+	return success;
 }
 
 /******************************************************************************
@@ -364,7 +370,7 @@ JXSelectionManager::SendDeleteRequest
 	JSize dataLength;
 	JXSelectionManager::DeleteMethod delMethod;
 
-	GetData(selectionName, time, itsDeleteSelectionXAtom,
+	GetData(selectionName, time, itsAtoms[ kDeleteSelectionAtomIndex ],
 			&amp;returnType, &amp;data, &amp;dataLength, &amp;delMethod);
 	DeleteData(&amp;data, delMethod);
 }
@@ -394,7 +400,7 @@ JXSelectionManager::RequestData
 		}
 
 	XConvertSelection(*itsDisplay, selectionName, type,
-					  itsSelectionWindPropXAtom, itsDataWindow, time);
+					  itsAtoms[ kSelectionWindPropAtomIndex ], itsDataWindow, time);
 
 	Bool receivedEvent = False;
 	XEvent xEvent;
@@ -421,7 +427,7 @@ JXSelectionManager::RequestData
 		return JI2B(selEvent-&gt;requestor == itsDataWindow &amp;&amp;
 					selEvent-&gt;selection == selectionName &amp;&amp;
 					selEvent-&gt;target    == type &amp;&amp;
-					selEvent-&gt;property  == itsSelectionWindPropXAtom );
+					selEvent-&gt;property  == itsAtoms[ kSelectionWindPropAtomIndex ] );
 		}
 	else
 		{
@@ -466,7 +472,7 @@ JXSelectionManager::HandleSelectionRequest
 
 	// allow Gnome apps to paste via menu item
 
-	if (selectionName == itsGnomeClipboardName)
+	if (selectionName == itsAtoms[ kGnomeClipboardAtomIndex ])
 		{
 		selectionName = kJXClipboardName;
 		}
@@ -583,7 +589,7 @@ JXSelectionManager::SendData
 	(JXGetApplication())-&gt;DisplayBusyCursor();
 
 	XID remainingLength = dataLength;		// must be 32 bits
-	XChangeProperty(*itsDisplay, requestor, property, itsIncrementalSendXAtom,
+	XChangeProperty(*itsDisplay, requestor, property, itsAtoms[ kIncrementalSendAtomIndex ],
 					32, PropModeReplace,
 					reinterpret_cast&lt;unsigned char*&gt;(&amp;remainingLength), 1);
 	itsDisplay-&gt;SendXEvent(requestor, returnEvent);
@@ -863,7 +869,7 @@ JXSelectionManager::ReceiveDataIncr
 		chunkIndex++;
 		#endif
 
-		if (!WaitForPropertyCreated(itsDataWindow, itsSelectionWindPropXAtom, sender))
+		if (!WaitForPropertyCreated(itsDataWindow, itsAtoms[ kSelectionWindPropAtomIndex ], sender))
 			{
 			#if JXSEL_DEBUG_MSGS
 			cout &lt;&lt; &quot;No response from selection owner on iteration &quot;;
@@ -878,7 +884,7 @@ JXSelectionManager::ReceiveDataIncr
 		int actualFormat;
 		unsigned long itemCount, remainingBytes;
 		unsigned char* chunk;
-		XGetWindowProperty(*itsDisplay, itsDataWindow, itsSelectionWindPropXAtom,
+		XGetWindowProperty(*itsDisplay, itsDataWindow, itsAtoms[ kSelectionWindPropAtomIndex ],
 						   0, LONG_MAX, True, AnyPropertyType,
 						   &amp;actualType, &amp;actualFormat,
 						   &amp;itemCount, &amp;remainingBytes, &amp;chunk);
@@ -1125,7 +1131,7 @@ JXSelectionManager::SetData
 
 		if (selectionName == kJXClipboardName)
 			{
-			XSetSelectionOwner(*itsDisplay, itsGnomeClipboardName, itsDataWindow, lastEventTime);
+			XSetSelectionOwner(*itsDisplay, itsAtoms[ kGnomeClipboardAtomIndex ], itsDataWindow, lastEventTime);
 			}
 
 		data-&gt;SetSelectionInfo(selectionName, lastEventTime);</diff>
      <filename>libjx/code/JXSelectionManager.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -8,10 +8,10 @@
 #ifndef _H_JXSelectionManager
 #define _H_JXSelectionManager
 
-#if !defined _J_UNIX &amp;&amp; !defined ACE_LACKS_PRAGMA_ONCE
-#pragma once
-#endif
-
+#if !defined _J_UNIX &amp;&amp; !defined ACE_LACKS_PRAGMA_ONCE
+#pragma once
+#endif
+
 #include &lt;JXSelectionData.h&gt;
 
 const Atom kJXClipboardName = XA_PRIMARY;
@@ -71,6 +71,26 @@ protected:
 
 	virtual void	ReceiveWithFeedback(JBroadcaster* sender, Message* message);
 
+public:		// kAtomCount required at global scope
+
+	enum
+	{
+		kSelectionWindPropAtomIndex,
+		kIncrementalSendAtomIndex,
+		kTargetsAtomIndex,
+		kTimeStampAtomIndex,
+		kTextAtomIndex,
+		kCompoundTextAtomIndex,
+		kMultipleAtomIndex,
+		kMimePlainTextAtomIndex,
+		kURLAtomIndex,
+		kDeleteSelectionAtomIndex,
+		kNULLAtomIndex,
+		kGnomeClipboardAtomIndex,
+
+		kAtomCount
+	};
+
 private:
 
 	JXDisplay*					itsDisplay;		// owns us
@@ -81,20 +101,7 @@ private:
 	JBoolean	itsReceivedAllocErrorFlag;
 	Window		itsTargetWindow;
 	JBoolean	itsTargetWindowDeletedFlag;
-
-	Atom itsSelectionWindPropXAtom;		// for receiving selection data
-	Atom itsIncrementalSendXAtom;		// for sending data incrementally
-
-	Atom itsTargetsXAtom;				// returns type XA_ATOM
-	Atom itsTimeStampXAtom;				// returns type XA_INTEGER
-	Atom itsTextXAtom;					//  8-bit characters
-	Atom itsCompoundTextXAtom;			// 16-bit characters
-	Atom itsMultipleXAtom;				// several formats at once
-	Atom itsMimePlainTextXAtom;			// &quot;text/plain&quot;
-	Atom itsURLXAtom;					// &quot;text/uri-list&quot;
-	Atom itsDeleteSelectionXAtom;		// returns type &quot;NULL&quot;
-	Atom itsNULLXAtom;					// &quot;NULL&quot;
-	Atom itsGnomeClipboardName;			// &quot;CLIPBOARD&quot;
+	Atom		itsAtoms[ kAtomCount ];
 
 private:
 
@@ -142,63 +149,63 @@ inline Atom
 JXSelectionManager::GetTargetsXAtom()
 	const
 {
-	return itsTargetsXAtom;
+	return itsAtoms[ kTargetsAtomIndex ];
 }
 
 inline Atom
 JXSelectionManager::GetTimeStampXAtom()
 	const
 {
-	return itsTimeStampXAtom;
+	return itsAtoms[ kTimeStampAtomIndex ];
 }
 
 inline Atom
 JXSelectionManager::GetTextXAtom()
 	const
 {
-	return itsTextXAtom;
+	return itsAtoms [kTextAtomIndex ];
 }
 
 inline Atom
 JXSelectionManager::GetCompoundTextXAtom()
 	const
 {
-	return itsCompoundTextXAtom;
+	return itsAtoms[ kCompoundTextAtomIndex ];
 }
 
 inline Atom
 JXSelectionManager::GetMultipleXAtom()
 	const
 {
-	return itsMultipleXAtom;
+	return itsAtoms[ kMultipleAtomIndex ];
 }
 
 inline Atom
 JXSelectionManager::GetMimePlainTextXAtom()
 	const
 {
-	return itsMimePlainTextXAtom;
+	return itsAtoms[ kMimePlainTextAtomIndex ];
 }
 
 inline Atom
 JXSelectionManager::GetURLXAtom()
 	const
 {
-	return itsURLXAtom;
+	return itsAtoms[ kURLAtomIndex ];
 }
 
 inline Atom
 JXSelectionManager::GetDeleteSelectionXAtom()
 	const
 {
-	return itsDeleteSelectionXAtom;
+	return itsAtoms[ kDeleteSelectionAtomIndex ];
 }
 
 inline Atom
 JXSelectionManager::GetNULLXAtom()
 	const
 {
-	return itsNULLXAtom;
+	return itsAtoms[ kNULLAtomIndex ];
 }
 
 /******************************************************************************</diff>
      <filename>libjx/code/JXSelectionManager.h</filename>
    </modified>
    <modified>
      <diff>@@ -2380,7 +2380,13 @@ JXTEBase::Receive
 		assert( info != NULL );
 		if (info-&gt;Successful())
 			{
-			GoToLine(itsGoToLineDialog-&gt;GetLineIndex());
+			JBoolean physicalLineIndexFlag;
+			JIndex lineIndex = itsGoToLineDialog-&gt;GetLineIndex(&amp;physicalLineIndexFlag);
+			if (physicalLineIndexFlag)
+				{
+				lineIndex = CRLineIndexToVisualLineIndex(lineIndex);
+				}
+			GoToLine(lineIndex);
 			}
 		itsGoToLineDialog = NULL;
 		}</diff>
      <filename>libjx/code/JXTEBase.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -12,6 +12,7 @@
 
 #include &lt;JXStdInc.h&gt;
 #include &lt;JXWindow.h&gt;
+#include &lt;JXIncrementWindowAPAMMTask.h&gt;
 #include &lt;JXWindowDirector.h&gt;
 #include &lt;JXMenuManager.h&gt;
 #include &lt;JXDNDManager.h&gt;
@@ -36,7 +37,7 @@
 #include &lt;X11/Xatom.h&gt;
 #include &lt;jXKeysym.h&gt;
 
-#include &lt;JString.h&gt;
+#include &lt;JThisProcess.h&gt;
 #include &lt;jASCIIConstants.h&gt;
 #include &lt;JMinMax.h&gt;
 #include &lt;jStreamUtil.h&gt;
@@ -49,10 +50,12 @@
 #include &lt;limits.h&gt;
 #include &lt;jAssert.h&gt;
 
-JBoolean JXWindow::theFoundWMFrameMethodFlag = kJFalse;
-JBoolean JXWindow::theWMFrameCompensateFlag  = kJFalse;
-const JCoordinate kWMFrameSlop               = 2;	// pixels
+JBoolean JXWindow::theFoundWMFrameMethodFlag  = kJFalse;
+JBoolean JXWindow::theWMFrameCompensateFlag   = kJFalse;
+JBoolean JXWindow::theWindowFrameIsParentFlag = kJTrue;
+const JCoordinate kWMFrameSlop                = 2;	// pixels
 
+// useful for research
 static const JCharacter* kWMOffsetFileName = &quot;~/.jx/wm_offset&quot;;
 JBoolean JXWindow::theWMOffsetInitFlag     = kJFalse;
 JPoint JXWindow::theWMOffset;
@@ -119,6 +122,7 @@ JXWindow::JXWindow
 	itsBounds(0, 0, h, w),
 	itsAdjustPlacementAfterMapMode(0),
 	itsIsDestructingFlag(kJFalse),
+	itsIncrAPAMMTask(NULL),
 	itsHasMinSizeFlag(kJFalse),
 	itsHasMaxSizeFlag(kJFalse),
 	itsIsMenuFlag(isMenu),
@@ -231,6 +235,12 @@ JXWindow::JXWindow
 
 	XFree(windowName.value);
 
+	// tell window manager about our process
+
+	const JUInt32 pid = (JThisProcess::Instance())-&gt;GetPID();
+	XChangeProperty(*itsDisplay, itsXWindow, itsDisplay-&gt;GetWMPidXAtom(),
+					XA_CARDINAL, 32, PropModeReplace, (unsigned char*) &amp;pid, 1);
+
 	// create JXDNDAware property for Drag-And-Drop
 
 	(GetDNDManager())-&gt;EnableDND(itsXWindow);
@@ -246,6 +256,13 @@ JXWindow::JXWindow
 	itsCloseAction = kCloseDirector;
 	AcceptSaveYourself(kJFalse);
 
+	// tell window manager what kind of window we are
+
+	if (isMenu)
+		{
+		SetWMWindowType(kWMPulldownMenuType);
+		}
+
 	// create GC to use when drawing
 
 	itsGC = new JXGC(itsDisplay, itsColormap, itsXWindow);
@@ -296,6 +313,15 @@ JXWindow::JXWindow
 	// notify the display that we exist
 
 	itsDisplay-&gt;WindowCreated(this, itsXWindow);
+
+	// If we are not shown initially, then we will need to adjust placement
+	// when Show() is eventually called.
+
+	#ifdef _J_OSX
+	itsIncrAPAMMTask = new JXIncrementWindowAPAMMTask(this);
+	assert( itsIncrAPAMMTask != NULL );
+	(JXGetApplication())-&gt;InstallUrgentTask(itsIncrAPAMMTask);
+	#endif
 }
 
 /******************************************************************************
@@ -321,6 +347,7 @@ JXWindow::~JXWindow()
 	delete itsShortcuts;
 	delete itsFocusList;
 	delete itsChildWindowList;
+	delete itsIncrAPAMMTask;
 
 	if (itsBufferPixmap != None)
 		{
@@ -612,7 +639,15 @@ JXWindow::Show()
 		XMapWindow(*itsDisplay, itsXWindow);
 		// input focus set by HandleMapNotify()
 		#ifdef _J_OSX
+		delete itsIncrAPAMMTask;
+		itsIncrAPAMMTask = NULL;
+
 		itsAdjustPlacementAfterMapMode++;
+		#else
+		if (!theWindowFrameIsParentFlag)
+			{
+			itsAdjustPlacementAfterMapMode++;
+			}
 		#endif
 
 		JXWindow* parent;
@@ -726,6 +761,40 @@ JXWindow::Raise
 		Place(itsWMFrameLoc.x, itsWMFrameLoc.y);
 		}
 
+	// move window to current desktop
+	// http://standards.freedesktop.org/wm-spec/latest/ar01s05.html
+
+	if (itsIsMappedFlag)
+		{
+		Window root = itsDisplay-&gt;GetRootWindow();
+
+		Atom actualType;
+		int actualFormat;
+		unsigned long itemCount, remainingBytes;
+		unsigned char* xdata;
+		XGetWindowProperty(*itsDisplay, root, itsDisplay-&gt;GetWMCurrentDesktopXAtom(),
+						   0, LONG_MAX, False, XA_CARDINAL,
+						   &amp;actualType, &amp;actualFormat,
+						   &amp;itemCount, &amp;remainingBytes, &amp;xdata);
+		if (actualType == XA_CARDINAL &amp;&amp; actualFormat == 32 &amp;&amp; itemCount &gt; 0)
+			{
+			const JUInt32 desktop = *reinterpret_cast&lt;JUInt32*&gt;(xdata);
+
+			XEvent e;
+			memset(&amp;e, 0, sizeof(e));
+			e.type                 = ClientMessage;
+			e.xclient.display      = *itsDisplay;
+			e.xclient.window       = itsXWindow;
+			e.xclient.message_type = itsDisplay-&gt;GetWMDesktopXAtom();
+			e.xclient.format       = 32;
+			e.xclient.data.l[0]    = desktop;
+			e.xclient.data.l[1]    = 1;	// normal app
+			itsDisplay-&gt;SendXEvent(root, &amp;e);
+			}
+
+		XFree(xdata);
+		}
+
 	XRaiseWindow(*itsDisplay, itsXWindow);
 
 	Broadcast(Raised());
@@ -1311,7 +1380,18 @@ JXWindow::CalcDesktopLocation
 	Window rootChild;
 	if (!GetRootChild(&amp;rootChild) || rootChild == itsXWindow)
 		{
-		return JPoint(origX, origY);
+		if (!itsIsMenuFlag &amp;&amp; itsIsMappedFlag)
+			{
+			theWindowFrameIsParentFlag = kJFalse;
+			}
+
+		JPoint desktopPt(origX, origY);
+		if (!itsIsMenuFlag)
+			{
+			desktopPt += theWMOffset * origDirection;
+			}
+
+		return desktopPt;
 		}
 
 	JCoordinate desktopX = origX;
@@ -1327,7 +1407,7 @@ JXWindow::CalcDesktopLocation
 		desktopY += y * direction;
 		}
 
-	// adjust position to offset fvwm2 bug
+	// useful for research (originally for fixing fvwm2 bug)
 
 	JPoint desktopPt(desktopX, desktopY);
 	if (!itsIsMenuFlag)
@@ -1495,11 +1575,12 @@ JXWindow::UndockedPlace
 		UpdateFrame();
 /*
 		cout &lt;&lt; endl;
+		cout &lt;&lt; JPoint(enclX, enclY) &lt;&lt; endl;
+		cout &lt;&lt; pt &lt;&lt; endl;
 		cout &lt;&lt; thePlacementAttempt;
 		cout &lt;&lt; theFoundWMFrameMethodFlag;
 		cout &lt;&lt; theWMFrameCompensateFlag &lt;&lt; endl;
 		cout &lt;&lt; GetDesktopLocation() &lt;&lt; endl;
-		cout &lt;&lt; JPoint(enclX, enclY) &lt;&lt; endl;
 */
 		thePlacementAttempt++;
 
@@ -1525,6 +1606,15 @@ JXWindow::UndockedPlace
 		const JPoint pt1 = pt + itsTopLeftOffset;
 		itsDesktopLoc    = pt1;
 		itsWMFrameLoc    = CalcDesktopLocation(pt1.x, pt1.y, -1);
+/*
+		cout &lt;&lt; endl;
+		cout &lt;&lt; JPoint(enclX, enclY) &lt;&lt; endl;
+		cout &lt;&lt; pt &lt;&lt; endl;
+		cout &lt;&lt; thePlacementAttempt;
+		cout &lt;&lt; theFoundWMFrameMethodFlag;
+		cout &lt;&lt; theWMFrameCompensateFlag &lt;&lt; endl;
+		cout &lt;&lt; GetDesktopLocation() &lt;&lt; endl;
+*/
 		}
 
 	// adjust window to fit on screen, since resize will otherwise be unavailable on OS X
@@ -1693,17 +1783,25 @@ JXWindow::UpdateFrame()
 	const int origX = x, origY = y;
 
 	// After XGetGeometry(), x=0 and y=0 for fvwm, but y&gt;0 for OS X
-	itsTopLeftOffset.Set(x,y);
-
+	if (theWindowFrameIsParentFlag &amp;&amp; itsIsMappedFlag)
+		{
+		itsTopLeftOffset.Set(x,y);
+		}
+	else
+		{
+		itsTopLeftOffset.Set(0,0);
+		}
+//if (!itsIsMenuFlag) cout &lt;&lt; &quot;itsTopLeftOffset: &quot; &lt;&lt; itsTopLeftOffset &lt;&lt; endl;
 	Window childWindow;
 	const Bool ok2 = XTranslateCoordinates(*itsDisplay, itsXWindow, rootWindow,
 										   0,0, &amp;x, &amp;y, &amp;childWindow);
 	assert( ok2 );
 
 	itsDesktopLoc.Set(x,y);		// also at end of Place()
+//if (!itsIsMenuFlag) cout &lt;&lt; &quot;itsDesktopLoc: &quot; &lt;&lt; itsDesktopLoc &lt;&lt; endl;
 	itsWMFrameLoc =
 		itsIsDockedFlag ? JPoint(origX, origY) : CalcDesktopLocation(x,y, -1);
-
+//if (!itsIsMenuFlag) cout &lt;&lt; &quot;itsWMFrameLoc: &quot; &lt;&lt; itsWMFrameLoc &lt;&lt; endl;
 	if (itsIsMappedFlag)
 		{
 		UpdateBounds(w, h);
@@ -2508,6 +2606,14 @@ JXWindow::HandleEvent
 		{
 		Close();											// can delete us
 		}
+	else if (IsWMPingMessage(itsDisplay, xEvent))
+		{
+		XEvent e;
+		memcpy(&amp;e, &amp;xEvent, sizeof(e));
+		e.xclient.window = itsDisplay-&gt;GetRootWindow();
+		XSendEvent(*itsDisplay, e.xclient.window, False,
+				   (SubstructureNotifyMask|SubstructureRedirectMask), &amp;e);
+		}
 	else if (IsSaveYourselfMessage(itsDisplay, xEvent))
 		{
 		const JString&amp; cmd = (JXGetApplication())-&gt;GetRestartCommand();
@@ -2540,6 +2646,25 @@ JXWindow::IsDeleteWindowMessage
 }
 
 /******************************************************************************
+ IsWMPingMessage (static)
+
+ ******************************************************************************/
+
+JBoolean
+JXWindow::IsWMPingMessage
+	(
+	const JXDisplay*	display,
+	const XEvent&amp;		xEvent
+	)
+{
+	return JI2B(
+		xEvent.type                       == ClientMessage &amp;&amp;
+		xEvent.xclient.message_type       == display-&gt;GetWMProtocolsXAtom() &amp;&amp;
+		xEvent.xclient.format             == 32 &amp;&amp;
+		((Atom) xEvent.xclient.data.l[0]) == display-&gt;GetWMPingXAtom());
+}
+
+/******************************************************************************
  IsSaveYourselfMessage (static)
 
  ******************************************************************************/
@@ -2569,12 +2694,29 @@ JXWindow::AcceptSaveYourself
 	const JBoolean accept
 	)
 {
-	Atom protocolList[2] =
+	Atom protocolList[3] =
 		{
 		itsDisplay-&gt;GetDeleteWindowXAtom(),		// always accept this one
+		itsDisplay-&gt;GetWMPingXAtom(),			// always accept this one
 		itsDisplay-&gt;GetSaveYourselfXAtom()
 		};
-	XSetWMProtocols(*itsDisplay, itsXWindow, protocolList, (accept ? 2 : 1));
+	XSetWMProtocols(*itsDisplay, itsXWindow, protocolList, (accept ? 3 : 2));
+}
+
+/******************************************************************************
+ SetWMWindowType
+
+ ******************************************************************************/
+
+void
+JXWindow::SetWMWindowType
+	(
+	const WMType type
+	)
+{
+	Atom atom = itsDisplay-&gt;GetWMWindowTypeXAtom(type);
+	XChangeProperty(*itsDisplay, itsXWindow, itsDisplay-&gt;GetWMWindowTypeXAtom(),
+					XA_ATOM, 32, PropModeReplace, (unsigned char*) &amp;atom, 1);
 }
 
 /******************************************************************************
@@ -4330,12 +4472,10 @@ JXWindow::HandleWMStateChange()
 	int actualFormat;
 	unsigned long itemCount, remainingBytes;
 	unsigned char* xdata;
-
-	const int result =
-		XGetWindowProperty(*itsDisplay, itsXWindow, itsDisplay-&gt;GetWMStateXAtom(),
-						   0, LONG_MAX, False, AnyPropertyType,
-						   &amp;actualType, &amp;actualFormat,
-						   &amp;itemCount, &amp;remainingBytes, &amp;xdata);
+	XGetWindowProperty(*itsDisplay, itsXWindow, itsDisplay-&gt;GetWMStateXAtom(),
+					   0, LONG_MAX, False, AnyPropertyType,
+					   &amp;actualType, &amp;actualFormat,
+					   &amp;itemCount, &amp;remainingBytes, &amp;xdata);
 	if (actualType != itsDisplay-&gt;GetWMStateXAtom() || actualFormat != 32)
 		{
 #ifndef _J_CYGWIN
@@ -4357,13 +4497,13 @@ JXWindow::HandleWMStateChange()
 		{
 		assert( remainingBytes == 0 );
 
-		if (*reinterpret_cast&lt;long*&gt;(xdata) == NormalState &amp;&amp; itsIsIconifiedFlag)
+		if (*reinterpret_cast&lt;JUInt32*&gt;(xdata) == NormalState &amp;&amp; itsIsIconifiedFlag)
 			{
 			itsIsIconifiedFlag = kJFalse;
 			Broadcast(Deiconified());
 			Refresh();
 			}
-		else if (*reinterpret_cast&lt;long*&gt;(xdata) == IconicState &amp;&amp; !itsIsIconifiedFlag)
+		else if (*reinterpret_cast&lt;JUInt32*&gt;(xdata) == IconicState &amp;&amp; !itsIsIconifiedFlag)
 			{
 			itsIsIconifiedFlag = kJTrue;
 			Broadcast(Iconified());
@@ -4770,6 +4910,30 @@ JXWindow::SetChildWindowVisible
 		}
 }
 
+/******************************************************************************
+ PrintWindowConfig
+
+ ******************************************************************************/
+
+void
+JXWindow::PrintWindowConfig()
+{
+	cout &lt;&lt; endl;
+	cout &lt;&lt; &quot;theFoundWMFrameMethodFlag:      &quot; &lt;&lt; theFoundWMFrameMethodFlag &lt;&lt; endl;
+	cout &lt;&lt; &quot;theWMFrameCompensateFlag:       &quot; &lt;&lt; theWMFrameCompensateFlag &lt;&lt; endl;
+	cout &lt;&lt; &quot;theWindowFrameIsParentFlag:     &quot; &lt;&lt; theWindowFrameIsParentFlag &lt;&lt; endl;
+	cout &lt;&lt; &quot;theWMOffsetInitFlag:            &quot; &lt;&lt; theWMOffsetInitFlag &lt;&lt; endl;
+	cout &lt;&lt; &quot;theWMOffset:                    &quot; &lt;&lt; theWMOffset &lt;&lt; endl;
+	cout &lt;&lt; &quot;theWMDesktopStyleInitFlag:      &quot; &lt;&lt; theWMDesktopStyleInitFlag &lt;&lt; endl;
+	cout &lt;&lt; &quot;theWMDesktopMapsWindowsFlag:    &quot; &lt;&lt; theWMDesktopMapsWindowsFlag &lt;&lt; endl;
+	cout &lt;&lt; &quot;theDesktopMargin:               &quot; &lt;&lt; theDesktopMargin &lt;&lt; endl;
+	cout &lt;&lt; &quot;itsDesktopLoc:                  &quot; &lt;&lt; itsDesktopLoc &lt;&lt; endl;
+	cout &lt;&lt; &quot;itsWMFrameLoc:                  &quot; &lt;&lt; itsWMFrameLoc &lt;&lt; endl;
+	cout &lt;&lt; &quot;itsTopLeftOffset:               &quot; &lt;&lt; itsTopLeftOffset &lt;&lt; endl;
+	cout &lt;&lt; &quot;itsAdjustPlacementAfterMapMode: &quot; &lt;&lt; itsAdjustPlacementAfterMapMode &lt;&lt; endl;
+	cout &lt;&lt; endl;
+}
+
 #define JTemplateType JXWindow::Shortcut
 #include &lt;JArray.tmpls&gt;
 #undef JTemplateType</diff>
      <filename>libjx/code/JXWindow.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -31,9 +31,12 @@ class JXIconDirector;
 class JXWindowIcon;
 class JXHintManager;
 class JXDockWidget;
+class JXIncrementWindowAPAMMTask;
 
 class JXWindow : public JXContainer
 {
+	friend class JXIncrementWindowAPAMMTask;
+
 public:
 
 	enum CloseAction
@@ -44,6 +47,15 @@ public:
 		kQuitApp
 	};
 
+	enum WMType
+	{
+		kWMNormalType = 1,
+		kWMDialogType,
+		kWMPulldownMenuType,
+		kWMPopupMenuType,
+		kWMTooltipType
+	};
+
 public:
 
 	JXWindow(JXWindowDirector* director, const JCoordinate w, const JCoordinate h,
@@ -145,6 +157,7 @@ public:
 	JBoolean		GetIconWidget(JXWindowIcon** widget) const;
 
 	JBoolean	IsDragging() const;
+	void		PrintWindowConfig();
 
 	static JBoolean	WillAutoDockNewWindows();
 	static void		ShouldAutoDockNewWindows(const JBoolean autoDock);
@@ -152,6 +165,8 @@ public:
 	static JBoolean	WillFocusFollowCursorInDock();
 	static void		ShouldFocusFollowCursorInDock(const JBoolean focusFollowsCursor);
 
+	void	SetWMWindowType(const WMType type);
+
 	// redrawing options
 
 	void		BufferDrawing(const JBoolean bufferDrawing);
@@ -176,6 +191,7 @@ public:
 	void	HandleEvent(const XEvent&amp; xEvent);
 
 	static JBoolean	IsDeleteWindowMessage(const JXDisplay* display, const XEvent&amp; xEvent);
+	static JBoolean	IsWMPingMessage(const JXDisplay* display, const XEvent&amp; xEvent);
 	static JBoolean	IsSaveYourselfMessage(const JXDisplay* display, const XEvent&amp; xEvent);
 
 	static void	SetDesktopHMargin(const JCoordinate dw);
@@ -352,7 +368,7 @@ private:
 	JPoint		itsDesktopLoc;				// stored separately, since bounds = (0,0,h,w)
 	JRect		itsBounds;
 	JPoint		itsWMFrameLoc;				// upper left of Window Manager border
-	JPoint		itsTopLeftOffset;			// non-zero on OS X
+	JPoint		itsTopLeftOffset;			// non-zero on OS X or if !theWindowFrameIsParentFlag
 	JIndex		itsAdjustPlacementAfterMapMode;	// 0=init, 1=no, 2=yes
 	Region		itsUpdateRegion;
 	JBoolean	itsIsMappedFlag;
@@ -364,6 +380,8 @@ private:
 	JBoolean	itsUseBkgdPixmapFlag;		// kJTrue =&gt; use XSetWindowBackgroundPixmap()
 	JBoolean	itsIsDestructingFlag;		// kJTrue =&gt; in destructor
 
+	JXIncrementWindowAPAMMTask*	itsIncrAPAMMTask;	// NULL unless waiting to see if window will initially be visible
+
 	JBoolean	itsHasMinSizeFlag;
 	JPoint		itsMinSize;
 	JBoolean	itsHasMaxSizeFlag;
@@ -414,6 +432,7 @@ private:
 
 	static JBoolean theFoundWMFrameMethodFlag;
 	static JBoolean theWMFrameCompensateFlag;
+	static JBoolean	theWindowFrameIsParentFlag;
 
 	static JBoolean	theWMOffsetInitFlag;
 	static JPoint	theWMOffset;</diff>
      <filename>libjx/code/JXWindow.h</filename>
    </modified>
    <modified>
      <diff>@@ -9,6 +9,7 @@
 #include &lt;jXUtil.h&gt;
 #include &lt;JXDisplay.h&gt;
 #include &lt;JXImageMask.h&gt;
+#include &lt;X11/Xatom.h&gt;
 #include &lt;JRegex.h&gt;
 #include &lt;jFileUtil.h&gt;
 #include &lt;jGlobals.h&gt;
@@ -344,9 +345,12 @@ JXUnpackStrings
 		{
 		const JBoolean found = data.LocateNextSubstring(separator, sepLength, &amp;i);
 
-		JString* str = new JString(origData + prevIndex-1, i - prevIndex);
-		assert( str != NULL );
-		strList-&gt;Append(str);
+		if (origData[ prevIndex-1 ] != '\0')
+			{
+			JString* str = new JString(origData + prevIndex-1, i - prevIndex);
+			assert( str != NULL );
+			strList-&gt;Append(str);
+			}
 
 		if (found)
 			{
@@ -485,3 +489,86 @@ JXReportUnreachableHosts
 		(JGetStringManager())-&gt;ReportError(kUnreachableHostsID, hosts);
 		}
 }
+
+/******************************************************************************
+ JXFixBrokenURLs
+
+ ******************************************************************************/
+
+static const JCharacter* kInvalidURLHostMarker = &quot;:///&quot;;
+
+static JString
+jXGetClientMachineName
+	(
+	JXDisplay*		display,
+	const Window	xWindow
+	)
+{
+	JString machineName;
+
+	Atom actualType;
+	int actualFormat;
+	unsigned long itemCount, remainingBytes;
+	unsigned char* xdata;
+	XGetWindowProperty(*display, xWindow, display-&gt;GetWMClientMachineXAtom(),
+					   0, LONG_MAX, False, XA_STRING,
+					   &amp;actualType, &amp;actualFormat,
+					   &amp;itemCount, &amp;remainingBytes, &amp;xdata);
+	if (actualType == XA_STRING &amp;&amp; actualFormat == 8 &amp;&amp; itemCount &gt; 0)
+		{
+		machineName.Set((JCharacter*) xdata, itemCount);
+		}
+
+	XFree(xdata);
+	return machineName;
+}
+
+JBoolean
+JXFixBrokenURLs
+	(
+	const JCharacter*	data,
+	const JSize			length,
+	JXDisplay*			display,
+	const Window		srcWindow,
+	JString*			newData
+	)
+{
+	JPtrArray&lt;JString&gt; urlList(JPtrArrayT::kDeleteAll);
+	JXUnpackStrings(data, length, &amp;urlList, kURISeparator, kURISeparatorLength);
+
+	JBoolean changed = kJFalse;
+
+	const JSize count = urlList.GetElementCount();
+	JIndex j;
+	JString srcHost, destHost;
+	for (JIndex i=1; i&lt;=count; i++)
+		{
+		JString* url = urlList.NthElement(i);
+		if (!url-&gt;IsEmpty() &amp;&amp; url-&gt;GetFirstCharacter() != kURICommentMarker &amp;&amp;
+			url-&gt;LocateSubstring(kInvalidURLHostMarker, &amp;j))
+			{
+			if (srcHost.IsEmpty())
+				{
+				srcHost = jXGetClientMachineName(display, srcWindow);
+				if (srcHost.IsEmpty())
+					{
+					return kJFalse;
+					}
+				}
+
+			url-&gt;InsertSubstring(srcHost, j+3);
+			changed = kJTrue;
+			}
+		}
+
+	if (changed)
+		{
+		*newData = JXPackStrings(urlList, kURISeparator, kURISeparatorLength);
+		}
+	else
+		{
+		newData-&gt;Clear();
+		}
+
+	return changed;
+}</diff>
      <filename>libjx/code/jXUtil.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -77,4 +77,10 @@ void	JXUnpackFileNames(const JCharacter* data, const JSize length,
 						  JPtrArray&lt;JString&gt;* urlList);
 void	JXReportUnreachableHosts(const JPtrArray&lt;JString&gt;&amp; urlList);
 
+// only for use by JXSelectionManager
+
+JBoolean	JXFixBrokenURLs(const JCharacter* data, const JSize length,
+							JXDisplay* display, const Window srcWindow,
+							JString* newData);
+
 #endif</diff>
      <filename>libjx/code/jXUtil.h</filename>
    </modified>
    <modified>
      <diff>@@ -2253,13 +2253,13 @@ argument:
 =============== FORM ===============
 Name: JXGoToLineDialog
 Width: 190
-Height: 90
-Number of Objects: 5
+Height: 120
+Number of Objects: 6
 
 --------------------
 class: FL_BOX
 type: FLAT_BOX
-box: 0 0 190 90
+box: 0 0 190 120
 boxtype: FL_FLAT_BOX
 colors: FL_COL1 FL_COL1
 alignment: FL_ALIGN_CENTER
@@ -2277,7 +2277,7 @@ argument:
 --------------------
 class: FL_BUTTON
 type: RETURN_BUTTON
-box: 109 59 62 22
+box: 109 89 62 22
 boxtype: FL_UP_BOX
 colors: FL_COL1 FL_COL1
 alignment: FL_ALIGN_CENTER
@@ -2295,7 +2295,7 @@ argument:
 --------------------
 class: FL_BUTTON
 type: NORMAL_BUTTON
-box: 20 60 60 20
+box: 20 90 60 20
 boxtype: FL_UP_BOX
 colors: FL_COL1 FL_COL1
 alignment: FL_ALIGN_CENTER
@@ -2346,6 +2346,24 @@ name:
 callback: 
 argument: 
 
+--------------------
+class: FL_CHECKBUTTON
+type: PUSH_BUTTON
+box: 20 50 150 20
+boxtype: FL_NO_BOX
+colors: FL_COL1 FL_YELLOW
+alignment: FL_ALIGN_CENTER
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: Physical line number
+shortcut: #N
+resize: FL_RESIZE_ALL
+gravity: FL_NorthWest FL_NoGravity
+name: itsPhysicalLineIndexCB
+callback: 
+argument: 
+
 =============== FORM ===============
 Name: JXOKToCloseDialog
 Width: 330</diff>
      <filename>libjx/libjx.fd</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-jx_browser_data 82
+jx_browser_data 83
 # project tree
 0 &quot;root&quot;
 T
@@ -51,6 +51,10 @@ T
 F
 &quot;./code/JXWindow.cpp&quot;
 T
+2 &quot;JXIncrementWindowAPAMMTask.cpp&quot;
+F
+&quot;./code/JXIncrementWindowAPAMMTask.cpp&quot;
+T
 2 &quot;JXIconDirector.cpp&quot;
 F
 &quot;./code/JXIconDirector.cpp&quot;</diff>
      <filename>libjx/libjx.jcc</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,7 @@
 0
 okButton::JXGoToLineDialog::shortcuts::JXLayout &quot;^M&quot;
+itsPhysicalLineIndexCB::JXGoToLineDialog::JXLayout &quot;Physical line number&quot;
+itsPhysicalLineIndexCB::JXGoToLineDialog::shortcuts::JXLayout &quot;#N&quot;
 okButton::JXGoToLineDialog::JXLayout &quot;OK&quot;
 obj1_JXLayout::JXGoToLineDialog::JXLayout &quot;Goto line:&quot;
 cancelButton::JXGoToLineDialog::JXLayout &quot;Cancel&quot;</diff>
      <filename>libjx/strings/JXGoToLineDialog_layout</filename>
    </modified>
    <modified>
      <diff>@@ -111,9 +111,12 @@ static const JCharacter* kTestMenuStr =
 	&quot;  | Image viewer                      %k Ctrl-I&quot;
 	&quot;%l| Enable Smileys menu %b&quot;
 	&quot;%l| Zombie process&quot;
-	&quot;%l| Place window at (0,0)&quot;
-	&quot;  | Move window by (+10,+10)&quot;
+	&quot;%l| Place window at (0,0)             %k Ctrl-1&quot;
+	&quot;  | Place window at (30,30)           %k Ctrl-2&quot;
+	&quot;  | Place window at (100,100)         %k Ctrl-3&quot;
+	&quot;  | Move window by (+10,+10)          %k Ctrl-4&quot;
 	&quot;  | Raise all windows&quot;
+	&quot;  | Window config                     %k Ctrl-0&quot;
 	&quot;%l| Force broken pipe (does not dump core)&quot;
 	&quot;  | Generate X error (dumps core)&quot;
 	&quot;  | Lock up for 10 seconds (test MDI)&quot;;
@@ -129,7 +132,8 @@ enum
 	kTestImageViewCmd,
 	kTestDisabledMenuCmd,
 	kTestZombieProcessCmd,
-	kTestPlaceWindowCmd, kTestMoveWindowCmd, kRaiseAllWindowsCmd,
+	kTestPlaceWindow0Cmd, kTestPlaceWindow30Cmd, kTestPlaceWindow100Cmd,
+	kTestMoveWindowCmd, kRaiseAllWindowsCmd, kPrintWMConfigCmd,
 	kTestBrokenPipe, kTestUncaughtXError, kLockUpToTestMDICmd
 };
 
@@ -926,33 +930,35 @@ TestDirector::HandleTestMenu
 			}
 		}
 
-	else if (index == kTestPlaceWindowCmd)
+	else if (index == kTestPlaceWindow0Cmd)
 		{
 		JXWindow* window = GetWindow();
-
-//		window-&gt;Hide();
-//		(GetDisplay())-&gt;Synchronize();
-
 		window-&gt;Place(0,0);
 
-//		window-&gt;Show();
-//		(GetDisplay())-&gt;Synchronize();
-
 		cout &lt;&lt; endl;
 		cout &lt;&lt; &quot;Window is now at &quot; &lt;&lt; window-&gt;GetDesktopLocation() &lt;&lt; endl;
 		}
-	else if (index == kTestMoveWindowCmd)
+	else if (index == kTestPlaceWindow30Cmd)
 		{
 		JXWindow* window = GetWindow();
+		window-&gt;Place(30,30);
 
-//		window-&gt;Hide();
-//		(GetDisplay())-&gt;Synchronize();
+		cout &lt;&lt; endl;
+		cout &lt;&lt; &quot;Window is now at &quot; &lt;&lt; window-&gt;GetDesktopLocation() &lt;&lt; endl;
+		}
+	else if (index == kTestPlaceWindow100Cmd)
+		{
+		JXWindow* window = GetWindow();
+		window-&gt;Place(100,100);
 
+		cout &lt;&lt; endl;
+		cout &lt;&lt; &quot;Window is now at &quot; &lt;&lt; window-&gt;GetDesktopLocation() &lt;&lt; endl;
+		}
+	else if (index == kTestMoveWindowCmd)
+		{
+		JXWindow* window = GetWindow();
 		window-&gt;Move(10,10);
 
-//		window-&gt;Show();
-//		(GetDisplay())-&gt;Synchronize();
-
 		cout &lt;&lt; endl;
 		cout &lt;&lt; &quot;Window is now at &quot; &lt;&lt; window-&gt;GetDesktopLocation() &lt;&lt; endl;
 		}
@@ -960,6 +966,10 @@ TestDirector::HandleTestMenu
 		{
 		(GetDisplay())-&gt;RaiseAllWindows();
 		}
+	else if (index == kPrintWMConfigCmd)
+		{
+		(GetWindow())-&gt;PrintWindowConfig();
+		}
 
 	else if (index == kTestBrokenPipe)
 		{</diff>
      <filename>libjx/test/code/TestDirector.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -1001,8 +1001,27 @@ TestWidget::WillAcceptDrop
 	)
 {
 	JXDNDManager* dndMgr = GetDNDManager();
+	JXDisplay* display   = GetDisplay();
 
-	if (typeList.GetFirstElement() == (GetSelectionManager())-&gt;GetURLXAtom())
+	JBoolean hasURIList = kJFalse;
+
+	cout &lt;&lt; endl;
+	cout &lt;&lt; &quot;Data types available from DND source:&quot; &lt;&lt; endl;
+	cout &lt;&lt; endl;
+
+	const JSize typeCount = typeList.GetElementCount();
+	for (JIndex i=1; i&lt;=typeCount; i++)
+		{
+		const Atom type = typeList.GetElement(i);
+		cout &lt;&lt; XGetAtomName(*display, type) &lt;&lt; endl;
+
+		if (type == (GetSelectionManager())-&gt;GetURLXAtom())
+			{
+			hasURIList = kJTrue;
+			}
+		}
+
+	if (hasURIList)
 		{
 		if (its2Rect.Contains(pt) || its3Rect.Contains(pt))
 			{
@@ -1030,22 +1049,10 @@ TestWidget::WillAcceptDrop
 		}
 	else
 		{
-		JXDisplay* display = GetDisplay();
-
 		cout &lt;&lt; endl;
 		cout &lt;&lt; &quot;Not accepting the drop because the action isn't copy&quot; &lt;&lt; endl;
 		cout &lt;&lt; &quot;Action: &quot; &lt;&lt; XGetAtomName(*display, *action) &lt;&lt; endl;
 		cout &lt;&lt; endl;
-		cout &lt;&lt; &quot;Data types available from DND source:&quot; &lt;&lt; endl;
-		cout &lt;&lt; endl;
-
-		const JSize typeCount = typeList.GetElementCount();
-		for (JIndex i=1; i&lt;=typeCount; i++)
-			{
-			const Atom type = typeList.GetElement(i);
-			cout &lt;&lt; XGetAtomName(*display, type) &lt;&lt; endl;
-			}
-		cout &lt;&lt; endl;
 
 		PrintSelectionText(dndMgr-&gt;GetDNDSelectionName(), time,
 						   (GetSelectionManager())-&gt;GetMimePlainTextXAtom());
@@ -1103,6 +1110,7 @@ TestWidget::HandleDNDDrop
 		{
 		PrintSelectionText((GetDNDManager())-&gt;GetDNDSelectionName(), time, textType);
 		}
+
 	if (url)
 		{
 		PrintFileNames((GetDNDManager())-&gt;GetDNDSelectionName(), time);
@@ -1191,7 +1199,11 @@ TestWidget::PrintSelectionText
 		else
 			{
 			cout &lt;&lt; &quot;Data has unrecognized return type:  &quot;;
-			cout &lt;&lt; XGetAtomName(*(GetDisplay()), returnType) &lt;&lt; endl &lt;&lt; endl;
+			cout &lt;&lt; XGetAtomName(*(GetDisplay()), returnType) &lt;&lt; endl;
+			cout &lt;&lt; &quot;Trying to print it anyway:&quot; &lt;&lt; endl &lt;&lt; endl;
+
+			cout.write((char*) data, dataLength);
+			cout &lt;&lt; endl &lt;&lt; endl;
 			}
 
 		selMgr-&gt;DeleteData(&amp;data, delMethod);</diff>
      <filename>libjx/test/code/TestWidget.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-jx_browser_data 82
+jx_browser_data 83
 # project tree
 0 &quot;root&quot;
 T</diff>
      <filename>libjx/test/testjx.jcc</filename>
    </modified>
    <modified>
      <diff>@@ -206,6 +206,14 @@ debug: libs
 static: debug
 	@${J_STRIP_DEBUG} ${call EXE, ${PROG_NAME}}
 
+#
+# personal install
+#
+
+.PHONY : personal
+personal: static
+	@mv ${PROG_NAME} ${HOME}/bin/
+
 # DO NOT DELETE THIS LINE -- Code Crusader depends on it.
 
 # This portion of the file was automatically generated by Code Crusader.</diff>
      <filename>programs/ssh_askpass/Make.header</filename>
    </modified>
    <modified>
      <diff>@@ -167,7 +167,7 @@ SyGApplication::OpenDirectory
 
 	JString fixedName, trueName;
 	if (!JExpandHomeDirShortcut(pathName, &amp;fixedName) ||
-		!JGetTrueName(fixedName, &amp;trueName))
+		!JConvertToAbsolutePath(fixedName, NULL, &amp;trueName))
 		{
 		if (reportError)
 			{</diff>
      <filename>programs/systemg/code/SyGApplication.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -392,7 +392,7 @@ SyGCopyProcess::SyGCopyProcess
 
 	itsSrcNameList-&gt;Append(destPath);
 
-	const JError err = JSimpleProcess::Create(&amp;itsProcess, *itsSrcNameList);
+	const JError err = JSimpleProcess::Create(&amp;itsProcess, destPath, *itsSrcNameList);
 
 	// clean up to make Receive simpler
 </diff>
      <filename>programs/systemg/code/SyGCopyProcess.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -238,6 +238,8 @@ static const JCharacter* kContextMenuStr =
 	&quot;    Duplicate&quot;
 	&quot;  | Make alias&quot;
 	&quot;  | Find original&quot;
+	&quot;%l| Open this and close window&quot;
+	&quot;  | Open this and iconify window&quot;
 	&quot;%l| Run command on selection...&quot;
 	&quot;%l| Convert to file&quot;
 	&quot;  | Convert to program&quot;;
@@ -247,6 +249,8 @@ enum
 	kDuplicateCtxCmd = 1,
 	kMakeAliasCtxCmd,
 	kFindOriginalCtxCmd,
+	kOpenCloseCtxCmd,
+	OpenIconifyCtxCmd,
 	kRunOnSelCtxCmd,
 	kConvertToFileCtxCmd,
 	kConvertToProgramCtxCmd
@@ -3493,19 +3497,25 @@ SyGFileTreeTable::RestoreDirState
 		is &gt;&gt; v;
 		}
 
+	const JString&amp; basePath = itsFileTree-&gt;GetDirectory();
+
 	JSize nameCount;
 	is &gt;&gt; nameCount;
 
-	JString file, n;
+	JString file, full;
 	for (JIndex i=1; i&lt;=nameCount; i++)
 		{
 		is &gt;&gt; file;
+		if (!JConvertToAbsolutePath(file, basePath, &amp;full))
+			{
+			continue;
+			}
 
 		const JSize count = itsFileTreeList-&gt;GetElementCount();	// changes after Open()
 		for (JIndex j=1; j&lt;=count; j++)
 			{
-			n = (itsFileTreeList-&gt;GetDirEntry(j))-&gt;GetFullName();
-			if (JSameDirEntry(n, file))
+			const JString&amp; n = (itsFileTreeList-&gt;GetDirEntry(j))-&gt;GetFullName();
+			if (JSameDirEntry(n, full))
 				{
 				itsFileTreeList-&gt;Open(j);
 				break;
@@ -3526,12 +3536,15 @@ SyGFileTreeTable::SaveDirState
 	)
 {
 	JPtrArray&lt;JString&gt; names(JPtrArrayT::kDeleteAll);
+	const JString&amp; basePath = itsFileTree-&gt;GetDirectory();
+
 	JSize count = itsFileTreeList-&gt;GetElementCount();
 	for (JIndex i=1; i&lt;=count; i++)
 		{
 		if (itsFileTreeList-&gt;IsOpen(i))
 			{
-			names.Append((itsFileTreeList-&gt;GetDirEntry(i))-&gt;GetFullName());
+			names.Append(JConvertToRelativePath(
+				(itsFileTreeList-&gt;GetDirEntry(i))-&gt;GetFullName(), basePath));
 			}
 		}
 
@@ -3636,18 +3649,13 @@ SyGFileTreeTable::UpdateGitBranchMenu()
 			}
 		}
 
-	if (itsGitBranchMenu-&gt;IsEmpty())
-		{
-		itsGitBranchMenu-&gt;AppendItem(JGetString(&quot;NoBranchInfo::SyGFileTreeTable&quot;));
-		itsGitBranchMenu-&gt;DisableItem(1);
-		}
-	else
+	itsGitBranchCount = itsGitBranchMenu-&gt;GetItemCount();
+	if (itsGitBranchCount &gt; 0)
 		{
-		itsGitBranchCount = itsGitBranchMenu-&gt;GetItemCount();
 		itsGitBranchMenu-&gt;ShowSeparatorAfter(itsGitBranchCount);
-
-		itsGitBranchMenu-&gt;AppendMenuItems(kGitBranchMenuAddStr);
 		}
+
+	itsGitBranchMenu-&gt;AppendMenuItems(kGitBranchMenuAddStr);
 }
 
 /******************************************************************************
@@ -3888,6 +3896,8 @@ SyGFileTreeTable::UpdateContextMenu()
 
 	itsContextMenu-&gt;SetItemEnable(kMakeAliasCtxCmd,        hasSelection);
 	itsContextMenu-&gt;SetItemEnable(kFindOriginalCtxCmd,     findOriginal);
+	itsContextMenu-&gt;SetItemEnable(kOpenCloseCtxCmd,        hasSelection);
+	itsContextMenu-&gt;SetItemEnable(OpenIconifyCtxCmd,       hasSelection);
 	itsContextMenu-&gt;SetItemEnable(kConvertToFileCtxCmd,    hasSelection);
 	itsContextMenu-&gt;SetItemEnable(kConvertToProgramCtxCmd, hasSelection);
 }
@@ -3918,6 +3928,15 @@ SyGFileTreeTable::HandleContextMenu
 		FindOriginals();
 		}
 
+	else if (index == kOpenCloseCtxCmd)
+		{
+		OpenSelection(kJFalse, kJFalse, kJFalse, kJTrue);
+		}
+	else if (index == OpenIconifyCtxCmd)
+		{
+		OpenSelection(kJFalse, kJFalse, kJTrue, kJFalse);
+		}
+
 	else if (index == kRunOnSelCtxCmd)
 		{
 		OpenSelection(kJFalse, kJTrue, kJFalse, kJFalse);</diff>
      <filename>programs/systemg/code/SyGFileTreeTable.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -16,8 +16,10 @@
 
 #include &lt;jTypes.h&gt;
 
-const JFileVersion kSyGCurrentDirSetupVersion = 3;
+const JFileVersion kSyGCurrentDirSetupVersion = 4;
 
+// version 4:
+//	Saves relative paths of open directories.
 // version 3:
 //	Saves scrollbar setup.
 // version 2:</diff>
      <filename>programs/systemg/code/SyGFileVersions.h</filename>
    </modified>
    <modified>
      <diff>@@ -24,6 +24,7 @@
 #include &lt;JXChooseSaveFile.h&gt;
 
 #include &lt;jProcessUtil.h&gt;
+#include &lt;jVCSUtil.h&gt;
 #include &lt;jAssert.h&gt;
 
 enum
@@ -384,11 +385,24 @@ SyGFindFileDialog::SearchExpr
 	const JCharacter* expr
 	)
 {
+	JString e = &quot;( &quot;;
+	e        += expr;
+	e        += &quot; )&quot;;
+
+	const JCharacter** vcsDirName;
+	const JSize vcsDirNameCount = JGetVCSDirectoryNames(&amp;vcsDirName);
+	for (JIndex i=0; i&lt;vcsDirNameCount; i++)
+		{
+		e += &quot; -a ! -path */&quot;;
+		e += vcsDirName[i];
+		e += &quot;/*&quot;;
+		}
+
 	SyGTreeDir* dir;
 	if ((SyGGetApplication())-&gt;OpenDirectory(path, &amp;dir, NULL, kJTrue, kJTrue, kJFalse, kJTrue))
 		{
 		SyGFindFileTask* task;
-		SyGFindFileTask::Create(dir, path, expr, &amp;task);
+		SyGFindFileTask::Create(dir, path, e, &amp;task);
 		}
 }
 </diff>
      <filename>programs/systemg/code/SyGFindFileDialog.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -30,6 +30,10 @@ Enhanced drag-and-drop to allow dropping on writable folder inside non-writable
 &lt;p&gt;
 Fixed creation of symbolic links to only append \&quot;_alias\&quot; if the original name is already used in the destination directory.
 &lt;p&gt;
+Fixed displaying of files so it does &lt;em&gt;not&lt;/em&gt; dereference symlinks before it decides what to select.
+&lt;p&gt;
+Fixed bug so state of opened subdirectories is restored correctly even after the directory is renamed.
+&lt;p&gt;
 Supports the latest updates to the &lt;a href=http://newplanetsoftware.com/xdnd/&gt;XDND protocol&lt;/a&gt;.
 &lt;p&gt;
 Fixed crash on OSX 10.4 due to missing &lt;code&gt;/etc/fstab&lt;/code&gt;.</diff>
      <filename>programs/systemg/strings/SyGChangeLogText</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-jx_browser_data 82
+jx_browser_data 83
 # project tree
 0 &quot;root&quot;
 T</diff>
      <filename>programs/systemg/systemg.jcc</filename>
    </modified>
    <modified>
      <diff>@@ -1,38 +1,63 @@
-do *not* need wm_offset for latest fvwm2
+OSX
+	visible/visible			+
+	visible/hidden/show		+
+	hidden/visible			moves down
+	hidden/hidden/show		moves down
 
-upgrade to ctags 5.8 -- just patch JS/PHP, forget new languages
-build initial deb pkg def files (for testing at home)
+Ubuntu
+	test _NET_WM_DESKTOP
+	window is not child of WM frame
 
-http://standards.freedesktop.org/wm-spec/1.4/ar01s06.html
+build initial deb pkg def files (for testing at home)
 
-mesa 7.5
-	cd include/GL
-	ln -s ../../src/mesa/drivers/x11/xmesa.h
-	ln -s ../../src/mesa/drivers/x11/xmesa_x.h
+systemg:
+	optimize selection of multiple items
+		systemg *.cpp in large directory
+	locks up when find returns many files
+		-name *.cpp -o -name *.h -o -name *.xpm
 
 jcc:
 +	rock-stupid cmd line window: (dahvid.minor@gmail.com)
 
 medic:
+	breakpoint/watchpoint window (create/edit/delete)
+
 	accept connection or switch to gdb:  should stop listening on port
 		compile with static ACE to debug
 	restart either xdebug or java:  unable to listen on port &amp; crashes on exit
 		also need to fix SetProgram()
 
-	goto line should accept physical line number
-	adjust to text when window is resized, in case text wrapping is on
-
 	gdb
-		broken on OSX
+**		broken on OSX
 			http://ftp.gnu.org/pub/old-gnu/Manuals/gdb-5.1.1/html_node/gdb_211.html
 			http://www.devworld.apple.com/documentation/DeveloperTools/gdb/gdb/gdb_25.html
 
+			prints (gdb) even after program running because allows &quot;help&quot;, etc.
+			so...if get this back, then re-queue command for later
+				^error,msg=&quot;Cannot execute this command while the target is running.&quot;
+
 **		CMGetFullPath should stop process and then resume
 			currently uses SendMedicCommand() -&gt; SendRaw()
 			Send() pauses the program
+
+		*** if gdb on Linux supports them ***
+		Write MI output data parser in CMCommand
+			-stack-info-frame instead of &quot;info frame&quot;
+			-file-list-exec-source-files instead of &quot;info sources&quot;
+			-file-list-exec-source-file instead of &quot;info source&quot;
+
 	xdebug
 		click stack trace: selection jumps back to last frame
 		temp breakpoint doesn't disappear
+
+		Enable XDSocket::StartTimer() when not debugging
+		Always update stack, even if Stack Trace window is hidden
+		Eliminate double call to get local vars
+			Preserve existing items; don't just delete all before update
+		request source from debugger instead of assuming that file:// exists
+		*set* values
+		support conditional breakpoints, etc.
+
 	java
 		after kill jvm, fails to run again
 		source-jar unzips to /tmp
@@ -197,34 +222,16 @@ medic:
 		crash when open examine memory window -- disabled temporarily
 	DND for breakpoints -- moves associated commands, conditions, etc.
 
-	Xdebug support:
-		https://becomecloth.burbank.corp.yahoo.com/temp/admin.php?XDEBUG_SESSION_START=abc
-
-		Enable XDSocket::StartTimer() when not debugging
-
-		Always update stack when using xdebug,
-			even if Stack Trace window is hidden
-
-		Eliminate double call to get local vars
-			Preserve existing items; don't just delete all before update
-		Need to request source from debugger instead of assuming that file:// exists
-		Figure out how to *set* values
-		Figure out how to set and display breakpoints
-			Figure out how to support conditional breakpoints, etc.
-
 	Write MI output data parser in CMCommand
-		-file-list-exec-source-files instead of &quot;info sources&quot;
-		-var-create instead of &quot;print ...&quot;
-		-break-list instead of &quot;info breakpoints&quot;
-		-stack-info-frame instead of &quot;info frame&quot;
-		-stack-list-frames instead of &quot;info stack&quot;
-		-file-list-exec-source-file instead of &quot;info source&quot;
 		-stack-list-locals instead of &quot;info locals&quot;
+		-var-create instead of &quot;print ...&quot;
 
 arrow
 	fix SaveState() so it doesn't need JFileArray
 	specify timeout for lockfile and handle it as lock failure
-	doesn't save drafts if no inbox open
+*	doesn't save drafts if no inbox open
+*	doesn't recv mail if flush inbox during download (locking problem?)
+*	doesn't display anything when receive payment notification from PayPal
 
 -----
 </diff>
      <filename>todo</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>7a0ba8520f2b8ad27db6052428ebfb26b6a2cb67</id>
    </parent>
  </parents>
  <author>
    <name>John Lindal</name>
    <email>jafl@vorpal.(none)</email>
  </author>
  <url>http://github.com/jafl/jx_application_framework/commit/d0fa949609a80acb1a7a3855082e741e6f8fe55b</url>
  <id>d0fa949609a80acb1a7a3855082e741e6f8fe55b</id>
  <committed-date>2009-09-10T19:23:49-07:00</committed-date>
  <authored-date>2009-09-10T19:23:49-07:00</authored-date>
  <message>build: eliminate XPM warnings, Mesa-7.5 fixes; jx: _NET_WM_PING, _NET_WM_PID, _NET_WM_DESKTOP, patch XDND for files to work around broken impls, optimize atom creation</message>
  <tree>e5af41896262faedcfb465cf7fda5f5604069943</tree>
  <committer>
    <name>John Lindal</name>
    <email>jafl@vorpal.(none)</email>
  </committer>
</commit>
