diff -ubBPdr ../XDM/README ./README
--- ../XDM/README	Thu Jan  1 02:00:00 1970
+++ ./README	Tue Mar 18 22:37:00 1997
@@ -0,0 +1,92 @@
+This is the full source of the X consortium's xdm with Amit Margalit's
+changes to make it 3d, all ive done is to add a new resource to xdm and fiddle
+withe the login widget a bit to add the capability to shift the login widget
+around the screen randomly if the screen has been idle for a period of time
+
+This is the new resource found in xdm-config, the unit is seconds.
+
+DisplayManager*loginmoveInterval:       10
+
+
+all you have to do is
+xmkmf -a
+make 
+and change your xdm-config and  Xresources to use the new resources
+Heres my sample Xresources and xdm-config
+
+!---xdm-config begin---
+! $XConsortium: xdm-conf.cpp,v 1.2 93/09/28 14:30:32 gildea Exp $
+! Caolan McNamara xdm-config
+DisplayManager.errorLogFile:	/usr/X11R6/lib/X11/xdm/xdm-errors
+DisplayManager.pidFile:		/usr/X11R6/lib/X11/xdm/xdm-pid
+DisplayManager.keyFile:		/usr/X11R6/lib/X11/xdm/xdm-keys
+DisplayManager.servers:		/usr/X11R6/lib/X11/xdm/Xservers
+DisplayManager.accessFile:	/usr/X11R6/lib/X11/xdm/Xaccess
+DisplayManager._0.authorize:	true
+DisplayManager._0.setup:	/usr/X11R6/lib/X11/xdm/Xsetup_0
+DisplayManager._0.startup:	/usr/X11R6/lib/X11/xdm/GiveConsole
+DisplayManager._0.reset:	/usr/X11R6/lib/X11/xdm/TakeConsole
+DisplayManager*resources:	/usr/X11R6/lib/X11/xdm/Xresources
+DisplayManager*authComplain:	false
+DisplayManager*session:		/usr/X11R6/lib/X11/xdm/Xsession
+! this is a new line Caolan, 9312811@ul.ie
+DisplayManager*loginmoveInterval:	10
+!---xdm-config end ---
+
+
+
+!---Xresource begin--
+! $XConsortium: Xresources,v 1.7 93/09/28 14:30:29 gildea Exp $
+! Caolan McNamara Xresources
+xlogin*login.translations: #override\
+	Ctrl<Key>R: abort-display()\n\
+	<Key>F1: set-session-argument(failsafe) finish-field()\n\
+	Ctrl<Key>Return: set-session-argument(failsafe) finish-field()\n\
+	<Key>Return: set-session-argument() finish-field()
+xlogin*greeting: CLIENTHOST 
+xlogin*namePrompt: login:\ 
+xlogin*fail: Login incorrect
+#ifdef COLOR
+xlogin*borderWidth: 0
+xlogin*frameWidth: 6
+xlogin*innerFramesWidth: 2
+xlogin*shdColor: bisque4
+xlogin*hiColor: bisque1
+xlogin*background: bisque3
+xlogin*foreground: SlateBlue4
+
+xlogin*greetColor: MediumBlue
+xlogin*failColor: red
+*Foreground: black
+*Background: #fffff0
+#else
+xlogin*borderWidth: 3
+xlogin*frameWidth: 0
+xlogin*innerFramesWidth: 0
+xlogin*shdColor: black
+xlogin*hiColor: white
+
+xlogin*Foreground: black
+xlogin*Background: white
+#endif
+
+XConsole.text.geometry:	480x130
+XConsole.verbose:	true
+XConsole*iconic:	true
+XConsole*font:		fixed
+
+Chooser*geometry:		700x500+300+200
+Chooser*allowShellResize:	false
+Chooser*viewport.forceBars:	true
+Chooser*label.font:		*-new century schoolbook-bold-i-normal-*-240-*
+Chooser*label.label:		XDMCP Host Menu  from CLIENTHOST
+Chooser*list.font:		-*-*-medium-r-normal-*-*-230-*-*-c-*-iso8859-1
+Chooser*Command.font:		*-new century schoolbook-bold-r-normal-*-180-*
+!---Xresource end--
+
+Amit Margalit's version found at http://www.linux.org.il/local/XBanner/
+mine at 
+
+Caolan McNamara
+9312811@ul.ie
+http://skynet.csn.ul.ie
diff -ubBPdr ../XDM/README.Margalit ./README.Margalit
--- ../XDM/README.Margalit	Thu Jan  1 02:00:00 1970
+++ ./README.Margalit	Tue Mar 18 22:35:41 1997
@@ -0,0 +1,86 @@
+Hi!
+
+OK. Here's the deal. I've made the XDM login box a 3D outfit. The resources
+to control it are: (Compilation notes below).
+
+xlogin*hiColor:		 Color of the highlighted part of the frames
+xlogin*shdColor:	 Color of the frames' shaded part
+xlogin*frameWidth	 Width of outer frame
+xlogin*innerFramesWidht: Width of the inner frames
+xlogin*sepWidth:	 Width of the separator line
+
+Here's my Xresources_0 file:
+
+! $XConsortium: Xresources,v 1.7 93/09/28 14:30:29 gildea Exp $
+xlogin*login.translations: #override\
+	Ctrl<Key>R: abort-display()\n\
+	<Key>F1: set-session-argument(failsafe) finish-field()\n\
+	Ctrl<Key>Return: set-session-argument(failsafe) finish-field()\n\
+	<Key>Return: set-session-argument() finish-field()
+!xlogin*greeting: Running Debian GNU/Linux (CLIENTHOST)
+xlogin*greeting: Running Debian GNU/Linux
+xlogin*namePrompt: login:\ 
+xlogin*fail: Login incorrect
+xlogin*geometry: +380+380
+
+! Notice the borderWidth!
+
+#ifdef COLOR
+
+xlogin*borderWidth: 0
+xlogin*frameWidth: 6
+xlogin*innerFramesWidth: 2
+xlogin*shdColor: darkgoldenrod
+xlogin*hiColor: lightgoldenrod
+xlogin*background: goldenrod
+xlogin*foreground: darkgreen
+xlogin*greetColor: darkblue
+xlogin*failColor:  #c00000
+*Foreground: black
+*Background: #fffff0
+
+#else
+
+xlogin*borderWidth: 3
+xlogin*frameWidth: 0
+xlogin*innerFramesWidth: 0
+xlogin*shdColor: black
+xlogin*hiColor: white
+xlogin*Foreground: black
+xlogin*Background: white
+
+#endif
+
+XConsole.text.geometry:	480x130
+XConsole.verbose:	true
+XConsole*iconic:	true
+XConsole*font:		fixed
+
+Chooser*geometry:		700x500+300+200
+Chooser*allowShellResize:	false
+Chooser*viewport.forceBars:	true
+Chooser*label.font:		*-new century schoolbook-bold-i-normal-*-240-*
+Chooser*label.label:		XDMCP Host Menu  from CLIENTHOST
+Chooser*list.font:		-*-*-medium-r-normal-*-*-230-*-*-c-*-iso8859-1
+Chooser*Command.font:		*-new century schoolbook-bold-r-normal-*-180-*
+
+-------------------
+
+I didn't touch the chooser, yet, and I cannot promise you that I will. This
+code still contains minor bugs. They are only minor because I really didn't
+change much. Just added a couple of things. I suggest you compile the
+chooser with Xaw3D instead of hoping for a kludge from me...
+
+==============
+
+Compilation
+-----------
+
+Get ftp://sunsite.unc.edu/pub/Linux/X11/xutils/xdm.tar.gz and unpack it.
+It is also available in the XBanner ftp sites under the same file name.
+Then go into xdm/greeter and replace Login.h LoginP.h and Login.c with the
+ones I have supplied.
+
+Just 'xmkmf -a' and make.
+
+	Amit Margalit
diff -ubBPdr ../XDM/config/Xresources.3D ./config/Xresources.3D
--- ../XDM/config/Xresources.3D	Thu Jan  1 02:00:00 1970
+++ ./config/Xresources.3D	Mon Apr 28 11:04:43 1997
@@ -0,0 +1,46 @@
+! $XConsortium: Xresources,v 1.7 93/09/28 14:30:29 gildea Exp $
+xlogin*login.translations: #override\
+	Ctrl<Key>R: abort-display()\n\
+	<Key>F1: set-session-argument(failsafe) finish-field()\n\
+	Ctrl<Key>Return: set-session-argument(failsafe) finish-field()\n\
+	<Key>Return: set-session-argument() finish-field()
+xlogin*greeting: CLIENTHOST
+xlogin*namePrompt: login:\ 
+xlogin*fail: Login incorrect
+xlogin*y: 380
+#ifdef COLOR
+xlogin*borderWidth: 0
+xlogin*frameWidth: 6
+xlogin*innerFramesWidth: 2
+xlogin*shdColor: darkgoldenrod
+xlogin*hiColor: lightgoldenrod
+xlogin*background: goldenrod
+xlogin*foreground: darkgreen
+xlogin*greetColor: darkblue
+xlogin*failColor:  #c00000
+*Foreground: black
+*Background: #fffff0
+#else
+xlogin*borderWidth: 3
+xlogin*frameWidth: 0
+xlogin*innerFramesWidth: 0
+xlogin*shdColor: black
+xlogin*hiColor: white
+xlogin*Foreground: black
+xlogin*Background: white
+#endif
+
+XConsole.text.geometry:	480x130
+XConsole.verbose:	true
+XConsole*iconic:	true
+XConsole*font:		fixed
+
+Chooser*geometry:		700x500+300+200
+Chooser*allowShellResize:	false
+Chooser*viewport.forceBars:	true
+Chooser*label.font:		*-new century schoolbook-bold-i-normal-*-240-*
+Chooser*label.label:		XDMCP Host Menu  from CLIENTHOST
+Chooser*list.font:		-*-*-medium-r-normal-*-*-230-*-*-c-*-iso8859-1
+Chooser*Command.font:		*-new century schoolbook-bold-r-normal-*-180-*
+
+*debugLevel: 1
diff -ubBPdr ../XDM/config/xdm-conf.cpp ./config/xdm-conf.cpp
--- ../XDM/config/xdm-conf.cpp	Tue Sep 28 20:30:32 1993
+++ ./config/xdm-conf.cpp	Tue Mar 18 22:20:18 1997
@@ -11,3 +11,5 @@
 DisplayManager*resources:	XDMDIR/Xresources
 DisplayManager*session:		XDMDIR/Xsession
 DisplayManager*authComplain:	false
+! this is a new line Caolan, 9312811@ul.ie
+DisplayManager*loginmoveInterval:       10
diff -ubBPdr ../XDM/config/xdm-conf.cpp.original ./config/xdm-conf.cpp.original
--- ../XDM/config/xdm-conf.cpp.original	Thu Jan  1 02:00:00 1970
+++ ./config/xdm-conf.cpp.original	Tue Mar 18 22:19:38 1997
@@ -0,0 +1,13 @@
+! $XConsortium: xdm-conf.cpp,v 1.2 93/09/28 14:30:32 gildea Exp $
+DisplayManager.errorLogFile:	XDMDIR/xdm-errors
+DisplayManager.pidFile:		XDMDIR/xdm-pid
+DisplayManager.keyFile:		XDMDIR/xdm-keys
+DisplayManager.servers:		XDMDIR/Xservers
+DisplayManager.accessFile:	XDMDIR/Xaccess
+DisplayManager._0.authorize:	true
+DisplayManager._0.setup:	XDMDIR/Xsetup_0
+DisplayManager._0.startup:	XDMDIR/GiveConsole
+DisplayManager._0.reset:	XDMDIR/TakeConsole
+DisplayManager*resources:	XDMDIR/Xresources
+DisplayManager*session:		XDMDIR/Xsession
+DisplayManager*authComplain:	false
diff -ubBPdr ../XDM/dm.h ./dm.h
--- ../XDM/dm.h	Wed Feb  8 17:33:14 1995
+++ ./dm.h	Tue Mar 18 10:06:00 1997
@@ -180,7 +180,11 @@
 	int		openTimeout;	/* abort open attempt timeout */
 	int		startAttempts;	/* number of attempts at starting */
 	int		pingInterval;	/* interval between XSync */
+	int		moveInterval;	/* interval between movement*/
 	int		pingTimeout;	/* timeout for XSync */
+/*caolan begin*/
+	int		loginmoveInterval;	/* interval between login widget moves*/
+/*caolan end*/
 	int		terminateServer;/* restart for each session */
 	int		grabServer;	/* keep server grabbed for Login */
 	int		grabTimeout;	/* time to wait for grab */
diff -ubBPdr ../XDM/genauth.c ./genauth.c
--- ../XDM/genauth.c	Wed Feb  8 17:33:12 1995
+++ ./genauth.c	Sun Mar 16 04:40:56 1997
@@ -125,6 +125,7 @@
 {
     long	    ldata[2];
 
+/*
 #ifdef ITIMER_REAL
     {
 	struct timeval  now;
@@ -134,13 +135,16 @@
 	ldata[1] = now.tv_usec;
     }
 #else
+*/
     {
 	long    time ();
 
 	ldata[0] = time ((long *) 0);
 	ldata[1] = getpid ();
     }
+/*
 #endif
+*/
 #ifdef HASXDMAUTH
     {
     	int		    bit;
diff -ubBPdr ../XDM/greeter/Login.c ./greeter/Login.c
--- ../XDM/greeter/Login.c	Mon Apr 18 03:03:53 1994
+++ ./greeter/Login.c	Sat Apr 19 20:50:32 1997
@@ -42,6 +42,7 @@
 # include <X11/Xfuncs.h>
 
 # include <stdio.h>
+# include <time.h>
 
 # include "dm.h"
 # include "greet.h"
@@ -50,6 +51,8 @@
 #define offset(field) XtOffsetOf(LoginRec, login.field)
 #define goffset(field) XtOffsetOf(WidgetRec, core.field)
 
+extern Debug(), ResetLogin(), LogOutOfMem(), RedrawFail();
+
 static XtResource resources[] = {
     {XtNwidth, XtCWidth, XtRDimension, sizeof(Dimension),
 	goffset(width), XtRImmediate,	(XtPointer) 0},
@@ -67,6 +70,23 @@
         offset(greetpixel), XtRString,	XtDefaultForeground},
     {XtNfailColor, XtCForeground, XtRPixel, sizeof (Pixel),
 	offset(failpixel), XtRString,	XtDefaultForeground},
+/*caolan begin*/
+	{XtNlastEventTime, XtCLastEventTime, XtRInt , sizeof (int),
+	offset(lastEventTime), XtRImmediate,	(XtPointer)0},
+/*caolan end*/
+
+
+/* added by Amit Margalit */
+    {XtNhiColor, XtCForeground, XtRPixel, sizeof (Pixel),
+	offset(hipixel), XtRString,	XtDefaultForeground},
+    {XtNshdColor, XtCForeground, XtRPixel, sizeof (Pixel),
+	offset(shdpixel), XtRString,	XtDefaultForeground},
+    {XtNframeWidth, XtCFrameWidth, XtRInt, sizeof(int),
+        offset(outframewidth), XtRImmediate, (XtPointer) 1},
+    {XtNinnerFramesWidth, XtCFrameWidth, XtRInt, sizeof(int),
+        offset(inframeswidth), XtRImmediate, (XtPointer) 1},
+    {XtNsepWidth, XtCFrameWidth, XtRInt, sizeof(int),
+        offset(sepwidth), XtRImmediate, (XtPointer) 1},
     {XtNfont, XtCFont, XtRFontStruct, sizeof (XFontStruct *),
     	offset (font), XtRString,	"*-new century schoolbook-medium-r-normal-*-180-*"},
     {XtNpromptFont, XtCFont, XtRFontStruct, sizeof (XFontStruct *),
@@ -117,10 +137,12 @@
 
 # define LOGIN_PROMPT_W(w) (XTextWidth (w->login.promptFont,\
 				 w->login.namePrompt,\
-				 strlen (w->login.namePrompt)))
+				 strlen (w->login.namePrompt)) + \
+				 w->login.inframeswidth)
 # define PASS_PROMPT_W(w) (XTextWidth (w->login.promptFont,\
 				 w->login.passwdPrompt,\
-				 strlen (w->login.passwdPrompt)))
+				 strlen (w->login.passwdPrompt)) + \
+				 w->login.inframeswidth)
 # define PROMPT_W(w)	(max(LOGIN_PROMPT_W(w), PASS_PROMPT_W(w)))
 # define GREETING(w)	((w)->login.secure_session  && !(w)->login.allow_access ?\
 				(w)->login.greeting : (w)->login.unsecure_greet)
@@ -138,7 +160,7 @@
 # define LOGIN_H(w)	(3 * Y_INC(w) / 2)
 # define LOGIN_TEXT_X(w)(LOGIN_X(w) + PROMPT_W(w))
 # define PASS_X(w)	(LOGIN_X(w))
-# define PASS_Y(w)	(LOGIN_Y(w) + 8 * Y_INC(w) / 5)
+# define PASS_Y(w)	(LOGIN_Y(w) + 10 * Y_INC(w) / 5)
 # define PASS_W(w)	(LOGIN_W(w))
 # define PASS_H(w)	(LOGIN_H(w))
 # define PASS_TEXT_X(w)	(PASS_X(w) + PROMPT_W(w))
@@ -156,7 +178,7 @@
 	
 static void Initialize(), Realize(), Destroy(), Redisplay();
 static Boolean SetValues();
-static void draw_it ();
+void draw_it ();
 
 static int max (a,b) { return a > b ? a : b; }
 
@@ -186,6 +208,11 @@
 	x += XTextWidth (w->login.font, w->login.data.name, cursor);
     XDrawString (XtDisplay(w), XtWindow (w), w->login.textGC, x, LOGIN_Y(w),
 		w->login.data.name + cursor, strlen (w->login.data.name + cursor));
+
+	/*as good a place as any Caolan begin*/
+	w->login.lastEventTime = time(NULL);
+	/*as good a place as any Caolan end*/
+	
 }
 
 static void
@@ -215,7 +242,23 @@
 	return;
     }
     XFillRectangle (XtDisplay (w), XtWindow (w), gc,
-		    x, y - w->login.font->max_bounds.ascent, width, height);
+		    x, y+1 - w->login.font->max_bounds.ascent, width, height-1);
+    XDrawPoint     (XtDisplay (w), XtWindow (w), gc,
+    		    x-1 , y - w->login.font->max_bounds.ascent);
+    XDrawPoint     (XtDisplay (w), XtWindow (w), gc,
+    		    x+1 , y - w->login.font->max_bounds.ascent);
+    XDrawPoint     (XtDisplay (w), XtWindow (w), gc,
+    		    x-1 , y - w->login.font->max_bounds.ascent+height);
+    XDrawPoint     (XtDisplay (w), XtWindow (w), gc,
+    		    x+1 , y - w->login.font->max_bounds.ascent+height);
+    XDrawPoint     (XtDisplay (w), XtWindow (w), gc,
+    		    x-2 , y - w->login.font->max_bounds.ascent);
+    XDrawPoint     (XtDisplay (w), XtWindow (w), gc,
+    		    x+2 , y - w->login.font->max_bounds.ascent);
+    XDrawPoint     (XtDisplay (w), XtWindow (w), gc,
+    		    x-2 , y - w->login.font->max_bounds.ascent+height);
+    XDrawPoint     (XtDisplay (w), XtWindow (w), gc,
+    		    x+2 , y - w->login.font->max_bounds.ascent+height);
 }
 
 static void
@@ -268,7 +311,7 @@
     EraseFail (w);
 }
 
-DrawFail (ctx)
+int DrawFail (ctx)
     Widget	ctx;
 {
     LoginWidget	w;
@@ -285,9 +328,10 @@
 			w->login.failTimeout * 1000,
 		        failTimeout, (XtPointer) w);
     }
+  return 0;
 }
 
-RedrawFail (w)
+int RedrawFail (w)
     LoginWidget w;
 {
     int x = FAIL_X(w);
@@ -297,13 +341,91 @@
         XDrawString (XtDisplay (w), XtWindow (w), w->login.failGC,
 		    x, y,
 		    w->login.fail, strlen (w->login.fail));
+    return 0;
 }
 
-static void
+void
 draw_it (w)
     LoginWidget	w;
 {
+    int i,in_frame_x,in_login_y,in_pass_y,in_width,in_height;
+    int gr_line_x, gr_line_y, gr_line_w;
+
     EraseCursor (w);
+
+    if( (w->login.outframewidth) < 1 )
+      w->login.outframewidth = 1;
+    for(i=1;i<=(w->login.outframewidth);i++)
+    {
+      XDrawLine(XtDisplay (w), XtWindow (w), w->login.hiGC,
+    		i-1,i-1,w->core.width-i,i-1);
+      XDrawLine(XtDisplay (w), XtWindow (w), w->login.hiGC,
+    		i-1,i-1,i-1,w->core.height-i);
+      XDrawLine(XtDisplay (w), XtWindow (w), w->login.shdGC,
+    		w->core.width-i,i-1,w->core.width-i,w->core.height-i);
+      XDrawLine(XtDisplay (w), XtWindow (w), w->login.shdGC,
+    		i-1,w->core.height-i,w->core.width-i,w->core.height-i);
+    }
+    
+    /* make separator line */
+    gr_line_x = w->login.outframewidth;
+    gr_line_y = GREET_Y(w) + GREET_Y_INC(w);
+    gr_line_w = w->core.width - 2*(w->login.outframewidth);
+ 
+    for(i=1;i<=(w->login.sepwidth);i++)
+    {
+      XDrawLine(XtDisplay (w), XtWindow (w), w->login.shdGC,
+        gr_line_x,           gr_line_y + i-1,
+        gr_line_x+gr_line_w, gr_line_y + i-1);
+      XDrawLine(XtDisplay (w), XtWindow (w), w->login.hiGC,
+        gr_line_x,           gr_line_y + 2*(w->login.inframeswidth) -i,
+        gr_line_x+gr_line_w, gr_line_y + 2*(w->login.inframeswidth) -i);
+    }
+    
+    in_frame_x = LOGIN_TEXT_X(w) - w->login.inframeswidth - 3;
+    in_login_y = LOGIN_Y(w) - w->login.inframeswidth - 1 - TEXT_Y_INC(w);
+    in_pass_y  = PASS_Y(w) - w->login.inframeswidth - 1 - TEXT_Y_INC(w);
+ 
+    in_width = LOGIN_W(w) - PROMPT_W(w);
+    in_height = LOGIN_H(w) + w->login.inframeswidth + 2;
+
+    for(i=1;i<=(w->login.inframeswidth);i++)
+    {
+      /* Make top/left sides */
+      XDrawLine(XtDisplay (w), XtWindow (w), w->login.shdGC,
+	in_frame_x + i-1,             in_login_y + i-1,
+	in_frame_x + in_width-i,      in_login_y + i-1); 
+
+      XDrawLine(XtDisplay (w), XtWindow (w), w->login.shdGC,
+	in_frame_x + i-1,             in_login_y + i-1,
+	in_frame_x + i-1,             in_login_y + in_height-i); 
+
+      XDrawLine(XtDisplay (w), XtWindow (w), w->login.hiGC,
+        in_frame_x + in_width-i,      in_login_y + i-1,
+        in_frame_x + in_width-i,      in_login_y + in_height-i); 
+                
+      XDrawLine(XtDisplay (w), XtWindow (w), w->login.hiGC,
+	in_frame_x + i-1,             in_login_y + in_height-i,
+	in_frame_x + in_width-i,      in_login_y + in_height-i);
+
+      /* Make bottom/right sides */
+      XDrawLine(XtDisplay (w), XtWindow (w), w->login.shdGC,
+	in_frame_x + i-1,             in_pass_y + i-1,
+	in_frame_x + in_width-i,      in_pass_y + i-1); 
+
+      XDrawLine(XtDisplay (w), XtWindow (w), w->login.shdGC,
+	in_frame_x + i-1,             in_pass_y + i-1,
+	in_frame_x + i-1,             in_pass_y + in_height-i); 
+
+      XDrawLine(XtDisplay (w), XtWindow (w), w->login.hiGC,
+        in_frame_x + in_width-i,      in_pass_y + i-1,
+        in_frame_x + in_width-i,      in_pass_y + in_height-i); 
+                
+      XDrawLine(XtDisplay (w), XtWindow (w), w->login.hiGC,
+	in_frame_x + i-1,             in_pass_y + in_height-i,
+	in_frame_x + in_width-i,      in_pass_y + in_height-i);
+    }
+
     if (GREETING(w)[0])
 	    XDrawString (XtDisplay (w), XtWindow (w), w->login.greetGC,
 			GREET_X(w), GREET_Y(w),
@@ -331,6 +453,11 @@
 	XSetInputFocus (XtDisplay (w), XtWindow (w),
 			RevertToPointerRoot, CurrentTime);
     }
+	/*
+	caolan begin, some one said that its not redrawing if it goes 
+	behind then in front of e.g xconsole
+	*/
+	XSync(XtDisplay(w),True);
 }
 
 /*ARGSUSED*/
@@ -633,7 +760,7 @@
     XorCursor (ctx);
 }
 
-ResetLogin (w)
+int ResetLogin (w)
     LoginWidget	w;
 {
     EraseName (w, 0);
@@ -641,6 +768,7 @@
     w->login.data.name[0] = '\0';
     w->login.data.passwd[0] = '\0';
     w->login.state = GET_NAME;
+    return 0;
 }
 
 /* ARGSUSED */
@@ -654,19 +782,29 @@
     LoginWidget ctx = (LoginWidget)ctxw;
 
     char strbuf[128];
-    int  len;
+    int  len,pixels;
 
     len = XLookupString (&event->xkey, strbuf, sizeof (strbuf), 0, 0);
     strbuf[len] = '\0';
+
+    pixels = 3 + ctx->login.font->max_bounds.width * len +
+    	     XTextWidth(ctx->login.font,
+    	     		ctx->login.data.name,
+    	     		strlen(ctx->login.data.name));
+    	     	/* pixels to be added */
+
     switch (ctx->login.state) {
     case GET_NAME:
-	if (len + (int)strlen(ctx->login.data.name) >= NAME_LEN - 1)
+	if (
+	        (len + (int)strlen(ctx->login.data.name) >= NAME_LEN - 1)/* &&
+		(pixels <= LOGIN_W(ctx) - PROMPT_W(ctx))*/
+	   )
 	    len = NAME_LEN - strlen(ctx->login.data.name) - 2;
     case GET_PASSWD:
 	if (len + (int)strlen(ctx->login.data.passwd) >= NAME_LEN - 1)
 	    len = NAME_LEN - strlen(ctx->login.data.passwd) - 2;
     }
-    if (len == 0)
+    if (len == 0 || pixels >= LOGIN_W(ctx) - PROMPT_W(ctx))
 	return;
     XorCursor (ctx);
     RemoveFail (ctx);
@@ -686,6 +824,10 @@
 	       strlen (ctx->login.data.passwd + ctx->login.cursor) + 1);
 	memmove( ctx->login.data.passwd + ctx->login.cursor, strbuf, len);
 	ctx->login.cursor += len;
+
+	/*as good a place as any Caolan begin*/
+	ctx->login.lastEventTime = time(NULL);
+	/*as good a place as any Caolan end*/
 	break;
     }
     XorCursor (ctx);
@@ -703,6 +845,16 @@
     Arg		position[2];
     Position	x, y;
 
+    myXGCV.foreground = w->login.hipixel;
+    myXGCV.background = w->core.background_pixel;
+    valuemask = GCForeground | GCBackground;
+    w->login.hiGC = XtGetGC(gnew, valuemask, &myXGCV);
+
+    myXGCV.foreground = w->login.shdpixel;
+    myXGCV.background = w->core.background_pixel;
+    valuemask = GCForeground | GCBackground;
+    w->login.shdGC = XtGetGC(gnew, valuemask, &myXGCV);
+ 
     myXGCV.foreground = w->login.textpixel;
     myXGCV.background = w->core.background_pixel;
     valuemask = GCForeground | GCBackground;
@@ -802,6 +954,8 @@
     XtReleaseGC(gw, w->login.promptGC);
     XtReleaseGC(gw, w->login.greetGC);
     XtReleaseGC(gw, w->login.failGC);
+    XtReleaseGC(gw, w->login.hiGC);
+    XtReleaseGC(gw, w->login.shdGC);
 }
 
 /* ARGSUSED */
@@ -891,7 +1046,7 @@
     /* expose			*/	Redisplay,
     /* set_values		*/	SetValues,
     /* set_values_hook		*/	NULL,
-    /* set_values_almost	*/	NULL,
+    /* set_values_almost	*/	XtInheritSetValuesAlmost,
     /* get_values_hook		*/	NULL,
     /* accept_focus		*/	NULL,
     /* version			*/	XtVersion,
diff -ubBPdr ../XDM/greeter/Login.h ./greeter/Login.h
--- ../XDM/greeter/Login.h	Mon Apr 18 03:03:53 1994
+++ ./greeter/Login.h	Tue Mar 18 10:37:58 1997
@@ -77,6 +77,20 @@
 # define XtNsecureSession	"secureSession"
 # define XtNallowAccess		"allowAccess"
 
+/* added by Amit Margalit Oct 1996 */
+# define XtNhiColor		"hiColor"
+# define XtNshdColor		"shdColor"
+# define XtNframeWidth		"frameWidth"
+# define XtNinnerFramesWidth	"innerFramesWidth"
+# define XtNsepWidth		"sepWidth"
+
+/* caolan begin */
+#define XtNlastEventTime "lastEventTime"
+#define XtCLastEventTime "LastEventTime"
+/* caolan end */
+
+# define XtCFrameWidth		"FrameWidth"
+
 # define XtCGreeting		"Greeting"
 # define XtCNamePrompt		"NamePrompt"
 # define XtCPasswdPrompt	"PasswdPrompt"
diff -ubBPdr ../XDM/greeter/LoginP.h ./greeter/LoginP.h
--- ../XDM/greeter/LoginP.h	Mon Apr 18 03:03:54 1994
+++ ./greeter/LoginP.h	Tue Mar 18 10:38:26 1997
@@ -50,12 +50,16 @@
 	Pixel		promptpixel;	/* prompt pixel */
 	Pixel		greetpixel;	/* greeting pixel */
 	Pixel		failpixel;	/* failure pixel */
+	Pixel		hipixel;	/* frame hilite pixel */
+	Pixel		shdpixel;	/* shadow frame pixel */
 	GC		textGC;		/* pointer to GraphicsContext */
 	GC		bgGC;		/* pointer to GraphicsContext */
 	GC		xorGC;		/* pointer to GraphicsContext */
 	GC		promptGC;
 	GC		greetGC;
 	GC		failGC;
+	GC		hiGC;		/* for hilight part of frame */
+	GC		shdGC;		/* for shaded part of frame */
 	char		*greeting;	/* greeting */
 	char		*unsecure_greet;/* message displayed when insecure */
 	char		*namePrompt;	/* name prompt */
@@ -75,6 +79,12 @@
 	XtIntervalId	interval_id;	/* drop fail message note */
 	Boolean		secure_session;	/* session is secured */
 	Boolean		allow_access;	/* disable access control on login */
+	/*caolan begin*/
+	int lastEventTime;
+	/*caolan end*/
+	int		outframewidth;	/* outer frame thickness */
+	int		inframeswidth;	/* inner frames thickness */
+	int		sepwidth;	/* width of separator line */
    } LoginPart;
 
 /* Full instance record declaration */
diff -ubBPdr ../XDM/greeter/greet.c ./greeter/greet.c
--- ../XDM/greeter/greet.c	Mon Apr 18 03:03:55 1994
+++ ./greeter/greet.c	Sun Apr 20 01:04:00 1997
@@ -89,7 +89,10 @@
 #include <krb5/krb5.h>
 #endif
 
-extern Display	*dpy;
+#include <stdlib.h>
+#include <stdio.h>
+
+Display	*dpy;
 
 static int	done, code;
 static char	name[128], password[128];
@@ -97,9 +100,61 @@
 static Widget		login;
 static XtAppContext	context;
 static XtIntervalId	pingTimeout;
+static XtIntervalId 	moveTimeout;
 
 /*ARGSUSED*/
 static void
+time_test (closure, intervalId)
+    XtPointer	    closure;
+    XtIntervalId    *intervalId;
+{
+int width;
+int height;
+int scn_width;
+int scn_height;
+int b,c,e,f;
+long int difference,thing;
+Window a;
+Arg args[2];
+Screen		*scrn;
+struct display *d;
+
+d = (struct display *) closure;
+
+scrn = XDefaultScreenOfDisplay(dpy);
+/*
+XtSetArg (args[0], XtNwidth, (XtArgVal) &width);
+XtSetArg (args[1], XtNheight, (XtArgVal) &height);
+XtGetValues (login, args, 2);
+doesnt work on  X Inside Inc server :-(
+*/
+XGetGeometry(dpy,XtWindow(login),&a,&b,&c,&width,&height,&e,&f);
+
+Debug("width and height of login widget %d %d\n",width,height);
+scn_width = XWidthOfScreen(scrn) - width -20; 
+scn_height = XHeightOfScreen(scrn) - height-20;
+
+/* By Amit Margalit 19-Apr-1997 - Paranoia */
+XRaiseWindow(dpy,XtWindow(toplevel));
+
+XtSetArg (args[0], XtNlastEventTime, (XtArgVal) &thing);
+XtGetValues (login, args, 1);
+
+Debug("last Event arrival time %d, \n",  thing);
+difference = time(NULL) - (thing+d->loginmoveInterval);
+
+if (difference < 0 )
+	moveTimeout = XtAppAddTimeOut (context, (d->loginmoveInterval-(time(NULL)-thing))*1000, time_test, (XtPointer) closure);
+else
+	{
+	XtMoveWidget(toplevel, (int)((double)rand() / ((double)RAND_MAX + 1) * scn_width),(int)((double)rand() / ((double)RAND_MAX + 1) * scn_height));
+	moveTimeout = XtAppAddTimeOut (context, d->loginmoveInterval*1000, time_test, (XtPointer) closure);
+	}
+XSync(dpy,True);
+Debug("Randomly moved greeter\n");
+}
+	
+static void
 GreetPingServer (closure, intervalId)
     XtPointer	    closure;
     XtIntervalId    *intervalId;
@@ -155,9 +210,9 @@
     Arg		arglist[10];
     int		i;
     static int	argc;
-    Screen		*scrn;
     static char	*argv[] = { "xlogin", 0 };
-    Display		*dpy;
+    Screen		*scrn;
+/*    Display		*dpy;*/
 
     Debug ("greet %s\n", d->name);
     argc = 1;
@@ -192,10 +247,15 @@
 				    arglist, i);
     XtRealizeWidget (toplevel);
 
+    /* by Amit Margalit 19-Apr-1997 */
+    XRaiseWindow(dpy,XtWindow(toplevel));
+
     XWarpPointer(dpy, None, XRootWindowOfScreen (scrn),
 		    0, 0, 0, 0,
 		    XWidthOfScreen(scrn) / 2,
 		    XHeightOfScreen(scrn) / 2);
+    if (d->loginmoveInterval > -1)
+        moveTimeout = XtAppAddTimeOut (context, d->loginmoveInterval*10000, time_test, (XtPointer) d);
 
     if (d->pingInterval)
     {
@@ -238,6 +298,12 @@
 {
     XEvent		event;
     Arg		arglist[1];
+    /* to return it to its place... */
+    int		orig_x,orig_y;
+    Window	aa;
+    int		bb,cc,dd,ee;
+
+    XGetGeometry(XtDisplay(toplevel),XtWindow(toplevel),&aa,&orig_x,&orig_y,&bb,&cc,&dd,&ee);
 
     XtSetArg (arglist[0], XtNallowAccess, False);
     XtSetValues (login, arglist, 1);
@@ -246,6 +312,13 @@
     done = 0;
     while (!done) {
 	    XtAppNextEvent (context, &event);
+	/* by Amit Margalit 19-Apr-1997 */
+	    if(event.type == KeyPress)
+	    {	/* reset the timeout as long as we type it stays in place */
+	      XtMoveWidget(toplevel,orig_x,orig_y);
+	      XtRemoveTimeOut(moveTimeout);
+              moveTimeout = XtAppAddTimeOut (context, d->loginmoveInterval*10000, time_test, (XtPointer) d);
+	    }
 	    XtDispatchEvent (&event);
     }
     XFlush (XtDisplay (toplevel));
Only in ../XDM: ls-lR.Z
Only in ../XDM: ls-ltR.Z
diff -ubBPdr ../XDM/resource.c ./resource.c
--- ../XDM/resource.c	Mon Apr 18 03:03:43 1994
+++ ./resource.c	Tue Mar 18 10:06:30 1997
@@ -59,6 +59,9 @@
 char	*greeterLib;
 int	choiceTimeout;	/* chooser choice timeout */
 
+/*caolan*/
+int	moveTimeout;	/* move login widget time*/
+
 # define DM_STRING	0
 # define DM_INT		1
 # define DM_BOOL	2
@@ -192,6 +195,10 @@
 				"5",
 "pingTimeout",	"PingTimeout",	DM_INT,		boffset(pingTimeout),
 				"5",
+/*caolan begin*/
+"loginmoveInterval","LoginmoveInterval",DM_INT,		boffset(loginmoveInterval),
+				"-1",
+/*caolan end*/
 "terminateServer","TerminateServer",DM_BOOL,	boffset(terminateServer),
 				"false",
 "grabServer",	"GrabServer",	DM_BOOL,	boffset(grabServer),
diff -ubBPdr ../XDM/xdm.man ./xdm.man
--- ../XDM/xdm.man	Mon Apr 18 03:03:49 1994
+++ ./xdm.man	Mon Mar 17 04:42:15 1997
@@ -545,6 +545,10 @@
 is unable to write to the usual user authorization file ($HOME/.Xauthority),
 it creates a unique file name in this directory and points the environment
 variable XAUTHORITY at the created file.  It uses \fI/tmp\fP by default.
+.IP "\fBDisplayManager.\fP\fIDISPLAY\fP\fB.loginmoveInterval\fP"
+if this is set to a non-negative value then at this interval of seconds the
+greeter widget (xlogin) will be randomly moved to a different screen location,
+added as a quick hack by 9312811@ul.ie (caolan mcnamara, http://skynet.csn.ul.ie/~caolan)
 .SH "CONFIGURATION FILE"
 First, the
 .I xdm

