diff -u -r WindowMaker-0.20.0/src/WindowMaker.h WindowMaker-0.20.0.patch/src/WindowMaker.h
--- WindowMaker-0.20.0/src/WindowMaker.h	Sun Sep 20 16:59:40 1998
+++ WindowMaker-0.20.0.patch/src/WindowMaker.h	Fri Sep 25 12:41:50 1998
@@ -165,6 +165,12 @@
 #define WS_FOCUSED	0
 #define WS_UNFOCUSED	1
 #define WS_PFOCUSED	2
+#ifdef TITLE_TEXT_SHADOW
+#define WS_SMENU       3
+#define WS_SFOCUSED    3
+#define WS_SUNFOCUSED  4
+#define WS_SPFOCUSED   5
+#endif /* TITLE_TEXT_SHADOW */
 
 /* clip title colors */
 #define CLIP_NORMAL    0
@@ -231,6 +237,12 @@
     char on_top_transients;	       /* transient windows are kept on top
 					* of their owners */
     char title_justification;	       /* titlebar text alignment */
+#ifdef TITLE_TEXT_SHADOW
+    char title_shadow;
+#endif
+#ifdef KEEP_XKB_LOCK_STATUS
+    char modelock;
+#endif
 
     char no_dithering;		       /* use dithering or not */
     
diff -u -r WindowMaker-0.20.0/src/defaults.c WindowMaker-0.20.0.patch/src/defaults.c
--- WindowMaker-0.20.0/src/defaults.c	Mon Sep 21 19:03:59 1998
+++ WindowMaker-0.20.0.patch/src/defaults.c	Fri Sep 25 12:45:32 1998
@@ -383,6 +383,23 @@
     {"UTitleColor",	"black",		(void*)WS_UNFOCUSED,
 	  NULL,				getColor,	setWTitleColor
     },
+#ifdef TITLE_TEXT_SHADOW
+    {"FShadowColor",     "black",                (void*)WS_SFOCUSED,
+          NULL,                         getColor,       setWTitleColor
+    },
+    {"PShadowColor",     "black",                (void*)WS_SPFOCUSED,
+          NULL,                         getColor,       setWTitleColor
+    },
+    {"UShadowColor",     "grey50",               (void*)WS_SUNFOCUSED,
+         NULL,                         getColor,       setWTitleColor
+    },
+    {"MShadowColor",     "black",               (void*)WS_SMENU,
+          NULL,                         getColor,       setMenuTitleColor
+    },
+    {"Shadow", "No",                    NULL,
+         &wPreferences.title_shadow, getBool,  setJustify
+    },
+#endif /* TITLE_TEXT_SHADOW */
     {"FTitleBack",	"(solid, black)",      	NULL,
 	  NULL,				getTexture,	setFTitleBack
     },
@@ -505,6 +522,14 @@
     {"Workspace10Key", "None",			(void*)WKBD_WORKSPACE10,
 	  NULL,				getKeybind,	setKeyGrab
     },
+#ifdef KEEP_XKB_LOCK_STATUS
+    {"ToggleKey", "None",                      (void*)WKBD_TOGGLE,
+          NULL,                         getKeybind,     setKeyGrab
+    },
+    {"ModeLock", "No",                    NULL,
+          &wPreferences.modelock, getBool,  NULL
+    },
+#endif /* KEEP_XKB_LOCK_STATUS */
 };
 
 
@@ -2764,14 +2789,25 @@
 
 
 static int 
+#ifdef TITLE_TEXT_SHADOW
+setMenuTitleColor(WScreen *scr, WDefaultEntry *entry, XColor *color, long index)
+#else
 setMenuTitleColor(WScreen *scr, WDefaultEntry *entry, XColor *color, void *foo)
+#endif /* TITLE_TEXT_SHADOW */
 {
     if (scr->menu_title_pixel[0]!=scr->white_pixel &&
 	scr->menu_title_pixel[0]!=scr->black_pixel) {
 	wFreeColor(scr, scr->menu_title_pixel[0]);
     }
-    
+#ifdef TITLE_TEXT_SHADOW
+    if (index == WS_SMENU){
+        scr->menu_title_pixel[WS_SMENU] = color->pixel;
+    }
+    else
+        scr->menu_title_pixel[0] = color->pixel;
+#else
     scr->menu_title_pixel[0] = color->pixel;
+#endif /* TITLE_TEXT_SHADOW */
     
     XSetForeground(dpy, scr->menu_title_gc, color->pixel);
     
diff -u -r WindowMaker-0.20.0/src/event.c WindowMaker-0.20.0.patch/src/event.c
--- WindowMaker-0.20.0/src/event.c	Tue Sep 22 13:05:19 1998
+++ WindowMaker-0.20.0.patch/src/event.c	Fri Sep 25 13:04:11 1998
@@ -34,7 +34,9 @@
 #ifdef SHAPE
 #include <X11/extensions/shape.h>
 #endif
-
+#ifdef KEEP_XKB_LOCK_STATUS     
+#include <X11/XKBlib.h>         
+#endif /* KEEP_XKB_LOCK_STATUS */#include "WindowMaker.h"
 #include "WindowMaker.h"
 #include "window.h"
 #include "actions.h"
@@ -1308,6 +1310,9 @@
     int i;
     int modifiers;
     int command=-1;
+#ifdef KEEP_XKB_LOCK_STATUS   
+        XkbStateRec staterec;     
+#endif /*KEEP_XKB_LOCK_STATUS*/
 
     /* ignore CapsLock */
     modifiers = event->xkey.state & ValidModMask;
@@ -1546,6 +1551,15 @@
         if (!wPreferences.flags.noclip)
             wDockRaiseLower(scr->workspaces[scr->current_workspace]->clip);
         break;
+#ifdef KEEP_XKB_LOCK_STATUS
+     case WKBD_TOGGLE:
+        if(wPreferences.modelock){
+           XkbGetState(dpy,XkbUseCoreKbd,&staterec);
+          /*toggle*/
+           XkbLockGroup(dpy,XkbUseCoreKbd,wwin->frame->languagemode=staterec.compat_state&32?0:1);
+        }
+        break;
+#endif /* KEEP_XKB_LOCK_STATUS */
     }
 }
 
diff -u -r WindowMaker-0.20.0/src/framewin.c WindowMaker-0.20.0.patch/src/framewin.c
--- WindowMaker-0.20.0/src/framewin.c	Mon Aug 24 02:09:50 1998
+++ WindowMaker-0.20.0.patch/src/framewin.c	Fri Sep 25 13:10:53 1998
@@ -775,6 +775,23 @@
 	    break;
 	}
 
+#ifdef TITLE_TEXT_SHADOW
+       if(wPreferences.title_shadow){
+          int shadowx,shadowy;
+          XSetForeground(dpy, *fwin->title_gc, 
+              fwin->title_pixel[fwin->flags.state+3]);
+           for(shadowx=0;shadowx<TITLE_TEXT_SHADOW_WIDTH;shadowx++)
+           for(shadowy=0;shadowy<TITLE_TEXT_SHADOW_HEIGHT;shadowy++)
+		wDrawString(fwin->titlebar->window, *fwin->font,
+			*fwin->title_gc,
+			x + shadowx + TITLE_TEXT_SHADOW_X_OFFSET, 
+			(*fwin->font)->y + TITLEBAR_EXTRA_HEIGHT/2
+                        + shadowy + TITLE_TEXT_SHADOW_Y_OFFSET, title,
+			titlelen);
+       }
+#endif /* TITLE_TEXT_SHADOW */ 
+
+
 	XSetForeground(dpy, *fwin->title_gc, 
 		       fwin->title_pixel[fwin->flags.state]);
 	
diff -u -r WindowMaker-0.20.0/src/framewin.h WindowMaker-0.20.0.patch/src/framewin.h
--- WindowMaker-0.20.0/src/framewin.h	Sat Aug 22 01:31:10 1998
+++ WindowMaker-0.20.0.patch/src/framewin.h	Fri Sep 25 13:11:01 1998
@@ -69,6 +69,9 @@
     short resizebar_corner_width;
 
     char *title;		       /* window name (title) */
+#ifdef KEEP_XKB_LOCK_STATUS
+    int languagemode;
+#endif /* KEEP_XKB_LOCK_STATUS */
 
     /* thing that uses this frame. passed as data to callbacks */
     void *child;
diff -u -r WindowMaker-0.20.0/src/keybind.h WindowMaker-0.20.0.patch/src/keybind.h
--- WindowMaker-0.20.0/src/keybind.h	Sun Aug  2 19:39:09 1998
+++ WindowMaker-0.20.0.patch/src/keybind.h	Fri Sep 25 13:11:06 1998
@@ -60,7 +60,12 @@
 #define WKBD_NEXTWSLAYER	32
 #define WKBD_PREVWSLAYER	33
 
+#ifdef KEEP_XKB_LOCK_STATUS
+#define WKBD_TOGGLE             34
+#define WKBD_LAST               35
+#else
 #define WKBD_LAST               34
+#endif /* KEEP_XKB_LOCK_STATUS */
 
 
 typedef struct WShortKey {
diff -u -r WindowMaker-0.20.0/src/misc.c WindowMaker-0.20.0.patch/src/misc.c
--- WindowMaker-0.20.0/src/misc.c	Tue Sep 22 13:05:19 1998
+++ WindowMaker-0.20.0.patch/src/misc.c	Fri Sep 25 12:22:11 1998
@@ -1152,12 +1152,12 @@
 	}
 	text = k+1;
     }
-    free(tmp);
 
     if (control) {
 	buffer = wstrappend(buffer, "^");
     }
     buffer = wstrappend(buffer, text);
+    free(tmp);
     
     /* get key */
 /*    ksym = XStringToKeysym(text);
diff -u -r WindowMaker-0.20.0/src/screen.h WindowMaker-0.20.0.patch/src/screen.h
--- WindowMaker-0.20.0/src/screen.h	Sat Sep 19 17:48:16 1998
+++ WindowMaker-0.20.0.patch/src/screen.h	Fri Sep 25 13:06:41 1998
@@ -136,8 +136,13 @@
     WMPixel select_pixel;
     WMPixel select_text_pixel;
     /* foreground colors */
+#ifdef TITLE_TEXT_SHADOW
+    WMPixel window_title_pixel[6];
+    WMPixel menu_title_pixel[6];       /* menu titlebar text */
+#else
     WMPixel window_title_pixel[3];     /* window titlebar text (foc, unfoc, pfoc)*/
     WMPixel menu_title_pixel[3];       /* menu titlebar text */
+#endif /* TITLE_TEXT_SHADOW */
     WMPixel clip_title_pixel[2];       /* clip title text */
     WMPixel mtext_pixel;	        /* menu item text */
     WMPixel dtext_pixel;	        /* disabled menu item text */
diff -u -r WindowMaker-0.20.0/src/wconfig.h.in WindowMaker-0.20.0.patch/src/wconfig.h.in
--- WindowMaker-0.20.0/src/wconfig.h.in	Sun Sep 20 17:06:05 1998
+++ WindowMaker-0.20.0.patch/src/wconfig.h.in	Fri Sep 25 13:10:32 1998
@@ -39,6 +39,16 @@
  * shading, icon arrangement etc. */
 #define ANIMATIONS
 
+/* drop shadow stuff */
+#define TITLE_TEXT_SHADOW
+#ifdef TITLE_TEXT_SHADOW
+#define TITLE_TEXT_SHADOW_X_OFFSET 1
+#define TITLE_TEXT_SHADOW_Y_OFFSET 1
+#define TITLE_TEXT_SHADOW_WIDTH 1
+#define TITLE_TEXT_SHADOW_HEIGHT 1
+#endif
+
+#define KEEP_XKB_LOCK_STATUS
 
 /*
  * #undef if you dont want the window creation animation when superfluous
diff -u -r WindowMaker-0.20.0/src/window.c WindowMaker-0.20.0.patch/src/window.c
--- WindowMaker-0.20.0/src/window.c	Tue Sep 22 13:05:19 1998
+++ WindowMaker-0.20.0.patch/src/window.c	Fri Sep 25 13:09:13 1998
@@ -27,6 +27,9 @@
 #ifdef SHAPE
 #include <X11/extensions/shape.h>
 #endif
+#ifdef KEEP_XKB_LOCK_STATUS
+#include <X11/XKBlib.h>
+#endif /* KEEP_XKB_LOCK_STATUS */
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -1278,6 +1281,13 @@
 void
 wWindowFocus(WWindow *wwin)
 {    
+#ifdef KEEP_XKB_LOCK_STATUS
+    if(wPreferences.modelock){
+        if(!wwin->flags.focused){
+            XkbLockGroup(dpy,XkbUseCoreKbd,wwin->frame->languagemode);
+        }
+    }
+#endif /* KEEP_XKB_LOCK_STATUS */
     wFrameWindowChangeState(wwin->frame, WS_FOCUSED);
 
     wwin->flags.focused=1;
@@ -1300,6 +1310,16 @@
 void
 wWindowUnfocus(WWindow *wwin)
 {
+#ifdef KEEP_XKB_LOCK_STATUS
+static XkbStateRec staterec;
+    if(wPreferences.modelock){
+        if(wwin->flags.focused){
+           XkbGetState(dpy,XkbUseCoreKbd,&staterec);
+          wwin->frame->languagemode=staterec.compat_state&32?1:0;
+           XkbLockGroup(dpy,XkbUseCoreKbd,0); /* reset to workspace */
+        }
+    }
+#endif /* KEEP_XKB_LOCK_STATUS */
     CloseWindowMenu(wwin->screen_ptr);
 
     wFrameWindowChangeState(wwin->frame, wwin->flags.semi_focused 
diff -u -r WindowMaker-0.20.0/util/getstyle.c WindowMaker-0.20.0.patch/util/getstyle.c
--- WindowMaker-0.20.0/util/getstyle.c	Sat Sep 19 17:48:17 1998
+++ WindowMaker-0.20.0.patch/util/getstyle.c	Fri Sep 25 13:14:04 1998
@@ -53,6 +53,12 @@
     "MenuTitleBack",	
     "MenuTextBack",
     "IconBack",	
+#ifdef TITLE_TEXT_SHADOW
+    "Shadow",
+    "FShadowColor",	
+    "PShadowColor",	
+    "UShadowColor",	
+#endif
     NULL
 };
 
