--- libwnck-2.21.5/configure.in	2008-01-14 23:47:07.000000000 +0100
+++ libwnck-2.21.5-new/configure.in	2008-01-23 20:02:49.000000000 +0100
@@ -136,6 +136,19 @@
 
 AC_SUBST(GDK_PIXBUF_CSOURCE)
 
+
+AC_MSG_CHECKING([whether gconf support is requested])
+AC_ARG_ENABLE([gconf],
+        AS_HELP_STRING([--enable-gconf],[Enable gconf-support for reading keyboard-bindings]),
+        [enable_gconf=$enableval have_gconf=$enableval])
+AC_MSG_RESULT([$enable_gconf])
+if test "x$enable_gconf" != "xno"; then
+        PKG_CHECK_MODULES([GCONF], [gconf-2.0 >= 2.20.0])
+	CFLAGS=-DUSE_GCONF
+fi
+AM_CONDITIONAL(ENABLE_GCONF, test "x$enable_gconf" = "xyes")
+
+
 dnl Honor ACLOCAL_FLAGS for --enable-maintainer-mode
 ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
 
--- libwnck-2.21.5/libwnck/Makefile.am	2008-01-14 23:42:41.000000000 +0100
+++ libwnck-2.21.5-new/libwnck/Makefile.am	2008-01-23 21:14:11.000000000 +0100
@@ -3,6 +3,10 @@
 	-DWNCK_I_KNOW_THIS_IS_UNSTABLE -DWNCK_LOCALEDIR=\"$(wncklocaledir)\" \
 	-DSN_API_NOT_YET_FROZEN=1 $(DISABLE_DEPRECATED_CFLAGS) $(WARN_CFLAGS)
 
+if ENABLE_GCONF
+INCLUDES += $(GCONF_CFLAGS)
+endif
+
 lib_LTLIBRARIES=libwnck-1.la
 
 libwnckincludedir=$(includedir)/libwnck-1.0/libwnck
@@ -92,6 +96,10 @@
 libwnck_1_la_LIBADD=   \
 	@LIBWNCK_LIBS@ @XLIB_LIBS@
 
+if ENABLE_GCONF
+libwnck_1_la_LIBADD+= $(GCONF_LIBS)
+endif
+
 wnckprop_LDADD=   \
 	@LIBWNCK_LIBS@ ./$(lib_LTLIBRARIES)
 
--- libwnck-2.21.5/libwnck/window-action-menu.c	2008-01-14 23:42:41.000000000 +0100
+++ libwnck-2.21.5-new/libwnck/window-action-menu.c	2008-01-28 21:00:15.000000000 +0100
@@ -27,6 +27,11 @@
 #include <stdio.h>
 #include <glib/gi18n-lib.h>
 
+#ifdef USE_GCONF
+#include <gdk/gdkkeysyms.h>
+#include <gconf/gconf-client.h>
+#endif
+
 #include "window-action-menu.h"
 #include "private.h"
 
@@ -57,6 +62,20 @@
  * </note>
  */
 
+#ifdef USE_GCONF
+#define CONF_WM                  "/apps/metacity/window_keybindings/"
+#define CONF_WM_CLOSE    CONF_WM "close"
+#define CONF_WM_MINIMIZE CONF_WM "minimize"
+#define CONF_WM_MAXIMIZE CONF_WM "maximize"
+#define CONF_WM_ABOVE    CONF_WM "toggle_above"
+#define CONF_WM_MOVE     CONF_WM "begin_move"
+#define CONF_WM_RESIZE   CONF_WM "begin_resize"
+#define CONF_WM_LEFT     CONF_WM "move_to_workspace_left"
+#define CONF_WM_RIGHT    CONF_WM "move_to_workspace_right"
+#define CONF_WM_UP       CONF_WM "move_to_workspace_up"
+#define CONF_WM_DOWN     CONF_WM "move_to_workspace_down"
+#endif /* HAVE_GCONF */
+
 typedef enum
 {
   CLOSE,
@@ -77,6 +96,9 @@
 struct _WnckActionMenuPrivate
 {
   WnckWindow *window;
+#ifdef USE_GCONF
+  GtkAccelGroup *accel_group;
+#endif /* USE_GCONF */
   GtkWidget *minimize_item;
   GtkWidget *maximize_item;
   GtkWidget *above_item;
@@ -979,6 +1001,9 @@
   menu->priv = WNCK_ACTION_MENU_GET_PRIVATE (menu);
 
   menu->priv->window = NULL;
+#ifdef USE_GCONF
+  menu->priv->accel_group = NULL;
+#endif /* USE_GCONF */
   menu->priv->minimize_item = NULL;
   menu->priv->maximize_item = NULL;
   menu->priv->above_item = NULL;
@@ -996,6 +1021,38 @@
   menu->priv->idle_handler = 0;
 }
 
+#ifdef USE_GCONF
+static void
+wnck_add_accelerator (GConfClient   *client,
+                      gchar         *gconf_key_path,
+                      GtkWidget     *menu_item,
+                      GtkAccelGroup *accel_group)
+{
+  GError          *error           = NULL;
+  guint           accelerator_key  = 0;
+  GdkModifierType accelerator_mods = 0;
+
+  g_assert (client != NULL);
+  g_assert (gconf_key_path != NULL);
+  g_assert (menu_item != NULL);
+  g_assert (accel_group != NULL);
+
+  gtk_accelerator_parse (gconf_client_get_string (client,
+                                                  gconf_key_path,
+                                                  &error),
+                         &accelerator_key,
+                         &accelerator_mods);
+
+  if (accelerator_key > 0)
+    gtk_widget_add_accelerator (menu_item,
+                                "activate",
+                                accel_group,
+                                accelerator_key,
+                                accelerator_mods,
+                                GTK_ACCEL_VISIBLE);
+}
+#endif /* USE_GCONF */
+
 static GObject *
 wnck_action_menu_constructor (GType                  type,
                               guint                  n_construct_properties,
@@ -1008,7 +1065,9 @@
   GtkWidget             *separator;
   GSList                *pin_group;
   WnckScreen            *screen;
-
+#ifdef USE_GCONF
+  GConfClient           *client;
+#endif /* USE_GCONF */
 
   obj = G_OBJECT_CLASS (wnck_action_menu_parent_class)->constructor (type,
                                                                      n_construct_properties,
@@ -1027,12 +1086,10 @@
   g_object_weak_ref (G_OBJECT (menu), object_weak_notify, priv->window);
 
   priv->minimize_item = make_menu_item (MINIMIZE);
-
   gtk_menu_shell_append (GTK_MENU_SHELL (menu),
                          priv->minimize_item);
 
   priv->maximize_item = make_menu_item (MAXIMIZE);
-
   gtk_menu_shell_append (GTK_MENU_SHELL (menu),
                          priv->maximize_item);
 
@@ -1120,6 +1177,67 @@
   set_item_text (priv->close_item, _("_Close"));
   set_item_stock (priv->close_item, WNCK_STOCK_DELETE);
 
+#ifdef USE_GCONF
+  g_type_init ();
+  client = gconf_client_get_default ();
+
+  priv->accel_group = gtk_accel_group_new ();
+  gtk_window_add_accel_group (GTK_WINDOW (gtk_widget_get_toplevel (priv->close_item)),
+                              priv->accel_group);
+
+  wnck_add_accelerator (client,
+                        CONF_WM_CLOSE,
+                        priv->close_item,
+                        priv->accel_group);
+
+  wnck_add_accelerator (client,
+                        CONF_WM_MINIMIZE,
+                        priv->minimize_item,
+                        priv->accel_group);
+
+  wnck_add_accelerator (client,
+                        CONF_WM_MAXIMIZE,
+                        priv->maximize_item,
+                        priv->accel_group);
+
+  wnck_add_accelerator (client,
+                        CONF_WM_ABOVE,
+                        priv->above_item,
+                        priv->accel_group);
+
+  wnck_add_accelerator (client,
+                        CONF_WM_MOVE,
+                        priv->move_item,
+                        priv->accel_group);
+
+  wnck_add_accelerator (client,
+                        CONF_WM_RESIZE,
+                        priv->resize_item,
+                        priv->accel_group);
+
+  wnck_add_accelerator (client,
+                        CONF_WM_LEFT,
+                        priv->left_item,
+                        priv->accel_group);
+
+  wnck_add_accelerator (client,
+                        CONF_WM_RIGHT,
+                        priv->right_item,
+                        priv->accel_group);
+
+  wnck_add_accelerator (client,
+                        CONF_WM_UP,
+                        priv->up_item,
+                        priv->accel_group);
+
+  wnck_add_accelerator (client,
+                        CONF_WM_DOWN,
+                        priv->down_item,
+                        priv->accel_group);
+
+  g_object_unref (client);
+#endif /* USE_GCONF */
+
   g_signal_connect_object (G_OBJECT (priv->window),
                            "state_changed",
                            G_CALLBACK (state_changed_callback),
