--- control-center-2.16.0/capplets/keybindings/gnome-keybinding-properties.c.compiz-support	2006-07-27 07:42:45.000000000 -0400
+++ control-center-2.16.0/capplets/keybindings/gnome-keybinding-properties.c	2006-09-28 12:16:02.000000000 -0400
@@ -42,6 +42,11 @@
   { "/apps/gnome_settings_daemon/keybindings/search", ALWAYS_VISIBLE, 0 },
   { "/apps/gnome_settings_daemon/keybindings/email", ALWAYS_VISIBLE, 0 },
   { "/apps/gnome_settings_daemon/keybindings/www", ALWAYS_VISIBLE, 0 },
+  { NULL }
+};
+
+static const KeyListEntry desktop_key_list_metacity[] =
+{
   { "/apps/metacity/global_keybindings/panel_run_dialog", ALWAYS_VISIBLE, 0 },
   { "/apps/metacity/global_keybindings/panel_main_menu", ALWAYS_VISIBLE, 0 },
   { "/apps/metacity/global_keybindings/run_command_screenshot", ALWAYS_VISIBLE, 0 },
@@ -49,6 +54,19 @@
   { "/apps/metacity/global_keybindings/run_command_terminal", ALWAYS_VISIBLE, 0 },
   { NULL }
 };
+    
+#define COMPIZ_KEY(k) { "/apps/compiz/general/allscreens/options/" #k, ALWAYS_VISIBLE, 0 }
+
+static const KeyListEntry desktop_key_list_compiz[] =
+{
+  COMPIZ_KEY (run_key),
+  COMPIZ_KEY (main_menu_key),
+  COMPIZ_KEY (run_command_screenshot_key),
+  COMPIZ_KEY (run_command_window_screenshot_key),
+  COMPIZ_KEY (show_desktop_key),
+  { NULL }
+};
+    
 static const KeyListEntry sounds_key_list[] =
 {
   { "/apps/gnome_settings_daemon/keybindings/volume_mute", ALWAYS_VISIBLE, 0 },
@@ -64,6 +82,26 @@
   { NULL }
 };
 
+static const KeyListEntry compiz_key_list[] =
+{
+  COMPIZ_KEY (close_window_key),
+  COMPIZ_KEY (raise_window_key),
+  COMPIZ_KEY (lower_window_key),
+  COMPIZ_KEY (maximize_window_key),
+  COMPIZ_KEY (maximize_window_horizontally_key),
+  COMPIZ_KEY (maximize_window_vertically_key),
+  COMPIZ_KEY (minimize_window_key),
+  COMPIZ_KEY (opacity_decrease_key),
+  COMPIZ_KEY (opacity_increase_key),
+  COMPIZ_KEY (show_desktop_key),
+  COMPIZ_KEY (toggle_window_maximized_key),
+  COMPIZ_KEY (toggle_window_maximized_horizontally_key),
+  COMPIZ_KEY (toggle_window_maximized_vertically_key),
+  COMPIZ_KEY (toggle_window_shaded_key),
+  COMPIZ_KEY (unmaximize_window_key),
+  COMPIZ_KEY (window_menu_key),
+};
+
 static const KeyListEntry metacity_key_list[] =
 {
   { "/apps/metacity/window_keybindings/activate_window_menu",      ALWAYS_VISIBLE,  0 },
@@ -453,10 +491,22 @@
   i = 0;
   gtk_tree_model_foreach (model, count_rows_foreach, &i);
 
-  gtk_tree_store_append (GTK_TREE_STORE (model), &parent_iter, NULL);
-  gtk_tree_store_set (GTK_TREE_STORE (model), &parent_iter,
-  		      DESCRIPTION_COLUMN, title,
-  		      -1);
+  if (title)
+    {
+      gtk_tree_store_append (GTK_TREE_STORE (model), &parent_iter, NULL);
+
+      gtk_tree_store_set (GTK_TREE_STORE (model), &parent_iter,
+			  DESCRIPTION_COLUMN, title,
+			  -1);
+    }
+  else
+    {
+      if (gtk_tree_model_get_iter_first (model, &parent_iter))
+	while (gtk_tree_model_iter_next (model, &parent_iter))
+	  ;
+      else
+	return;
+    }
 
   for (j = 0; keys_list[j].name != NULL; j++)
     {
@@ -522,7 +572,9 @@
 					  GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
 	}
       i++;
+
       gtk_tree_store_append (GTK_TREE_STORE (model), &iter, &parent_iter);
+      
       if (gconf_schema_get_short_desc (schema))
 	gtk_tree_store_set (GTK_TREE_STORE (model), &iter,
 			    DESCRIPTION_COLUMN,
@@ -551,14 +603,31 @@
 reload_key_entries (gpointer wm_name, GladeXML *dialog)
 {
   clear_old_model (dialog, WID ("shortcut_treeview"));
-  
+
+  /* Desktop keybindings */
   append_keys_to_tree (dialog, _("Desktop"), desktop_key_list);
+
+  if (strcmp ((char *) wm_name, WM_COMMON_METACITY) == 0)
+    {
+      append_keys_to_tree (dialog, NULL, desktop_key_list_metacity);
+    }
+  else if (strcmp ((char *) wm_name, WM_COMMON_COMPIZ) == 0)
+    {
+      append_keys_to_tree (dialog, NULL, desktop_key_list_compiz);
+    }
+
+  /* Sound keybindings */
   append_keys_to_tree (dialog, _("Sound"), sounds_key_list);
-  
+
+  /* Window management */
   if (strcmp((char *) wm_name, WM_COMMON_METACITY) == 0)
     {
       append_keys_to_tree (dialog, _("Window Management"), metacity_key_list);
     }
+  else if (strcmp((char *) wm_name, WM_COMMON_COMPIZ) == 0)
+    {
+      append_keys_to_tree (dialog, _("Window Management"), compiz_key_list);
+    }
 }
 
 static void
--- control-center-2.16.0/capplets/common/wm-common.h.compiz-support	2002-06-21 09:29:29.000000000 -0400
+++ control-center-2.16.0/capplets/common/wm-common.h	2006-09-27 15:36:29.000000000 -0400
@@ -2,6 +2,7 @@
 #define WM_COMMON_H
 
 #define WM_COMMON_METACITY "Metacity"
+#define WM_COMMON_COMPIZ   "compiz"
 #define WM_COMMON_SAWFISH  "Sawfish"
 #define WM_COMMON_UNKNOWN  "Unknown"
 
