I found it very annoying that ctwm treats the workspace window as a "normal"
window. I'd like to be able to bind keys tat will only work when the pointer is
in the workspace manager window, just as you can bind keys to functions when
the pointer is in the icon manager window. This was a quick'n'dirty hack, so
perhaps someone more familiar with the inner workings of ctwm could take a look
at it. The key bindings below illustrates my point:

"F1"	=	: iconmgr	: !"xeyes &"

Vanilla ctwm can bind F1 to pop up xeyes, if pressed in the icon manager, but
to get the same effect for the workspace manager, one would have to bind F1 in
all application windows. My patch allow you to bind keys in the workspace
window context, e.g.:

"F1"	=	: workspace	: !"xeyes &"

will pop up xeyes if F1 is pressed in the workspace manager, but not anywhere
else.

/Björn

BTW: It still seems to be the case that eight bit characters will truncate
strings in e.g. titlebars is I18N is enabled. Is that right?

- Patch (unified) against ctwm-3.5.2b follows ----------------------------------
diff -ru /tmp/foo/ctwm-3.5.2b/events.c ctwm-3.5.2b-bk/events.c
--- /tmp/foo/ctwm-3.5.2b/events.c	Mon Oct  4 15:51:26 1999
+++ ctwm-3.5.2b-bk/events.c	Fri Feb 25 10:57:25 2000
@@ -1213,6 +1213,8 @@
 	    Context = C_ICONMGR;
 	if (Tmp_win->list && Event.xany.window == Tmp_win->list->icon)
 	    Context = C_ICONMGR;
+	if (Tmp_win == Scr->workSpaceMgr.workspaceWindow.twm_win)
+	    Context = C_WORKSPACE;
     }
 
     modifier = (Event.xkey.state | AlternateKeymap) & mods_used;
diff -ru /tmp/foo/ctwm-3.5.2b/gram.y ctwm-3.5.2b-bk/gram.y
--- /tmp/foo/ctwm-3.5.2b/gram.y	Mon Oct  4 15:51:26 1999
+++ ctwm-3.5.2b-bk/gram.y	Fri Feb 25 10:55:19 2000
@@ -501,6 +501,7 @@
 		| ICON			{ cont |= C_ICON_BIT; }
 		| ROOT			{ cont |= C_ROOT_BIT; }
 		| FRAME			{ cont |= C_FRAME_BIT; }
+		| WORKSPACE		{ cont |= C_WORKSPACE_BIT; }
 		| ICONMGR		{ cont |= C_ICONMGR_BIT; }
 		| META			{ cont |= C_ICONMGR_BIT; }
 		| ALTER                 { cont |= C_ALTER_BIT; }
@@ -517,6 +518,7 @@
 		| ICON			{ cont |= C_ICON_BIT; }
 		| ROOT			{ cont |= C_ROOT_BIT; }
 		| FRAME			{ cont |= C_FRAME_BIT; }
+		| WORKSPACE		{ cont |= C_WORKSPACE_BIT; }
 		| ICONMGR		{ cont |= C_ICONMGR_BIT; }
 		| META			{ cont |= C_ICONMGR_BIT; }
 		| ALL			{ cont |= C_ALL_BITS; }
diff -ru /tmp/foo/ctwm-3.5.2b/twm.h ctwm-3.5.2b-bk/twm.h
--- /tmp/foo/ctwm-3.5.2b/twm.h	Mon Oct  4 15:51:12 1999
+++ ctwm-3.5.2b-bk/twm.h	Fri Feb 25 12:47:42 2000
@@ -141,7 +141,8 @@
 #define C_NAME		6
 #define C_IDENTIFY      7
 #define C_ALTERNATE     8
-#define NUM_CONTEXTS	9
+#define C_WORKSPACE	9
+#define NUM_CONTEXTS	10
 
 #define C_WINDOW_BIT	(1 << C_WINDOW)
 #define C_TITLE_BIT	(1 << C_TITLE)
@@ -151,8 +152,9 @@
 #define C_ICONMGR_BIT	(1 << C_ICONMGR)
 #define C_NAME_BIT	(1 << C_NAME)
 #define C_ALTER_BIT	(1 << C_ALTERNATE)
+#define C_WORKSPACE_BIT	(1 << C_WORKSPACE)
 
-#define C_ALL_BITS	(C_WINDOW_BIT | C_TITLE_BIT | C_ICON_BIT |\
+#define C_ALL_BITS	(C_WORKSPACE_BIT | C_WINDOW_BIT | C_TITLE_BIT | C_ICON_BIT |\
 			 C_ROOT_BIT | C_FRAME_BIT | C_ICONMGR_BIT)
 
 /* modifiers for button presses */
