--- gtk-old/gtkmenu.c	2011-12-12 11:09:08.505651410 +0000
+++ gtk/gtkmenu.c	2011-12-15 12:49:33.223797855 +0000
@@ -1492,6 +1492,7 @@
                            guint32              activate_time)
 {
   GtkMenuPrivate *priv = menu->priv;
+  GtkWidget *attach_widget;
   GtkWidget *widget;
   GtkWidget *xgrab_shell;
   GtkWidget *parent;
@@ -1648,15 +1649,13 @@
       gtk_menu_reparent (menu, priv->toplevel, FALSE);
     }
 
+  attach_widget = gtk_menu_get_attach_widget (menu);
   parent_toplevel = NULL;
   if (parent_menu_shell)
     parent_toplevel = gtk_widget_get_toplevel (parent_menu_shell);
-  else if (!g_object_get_data (G_OBJECT (menu), "gtk-menu-explicit-screen"))
-    {
-      GtkWidget *attach_widget = gtk_menu_get_attach_widget (menu);
-      if (attach_widget)
-        parent_toplevel = gtk_widget_get_toplevel (attach_widget);
-    }
+  else if (!g_object_get_data (G_OBJECT (menu), "gtk-menu-explicit-screen") &&
+           attach_widget)
+    parent_toplevel = gtk_widget_get_toplevel (attach_widget);
 
   /* Set transient for to get the right window group and parent */
   if (GTK_IS_WINDOW (parent_toplevel))
@@ -1669,6 +1668,27 @@
   priv->position_func_data_destroy = destroy;
   menu_shell->priv->activate_time = activate_time;
 
+  /* Add additional styling info from the parent. */
+  if (attach_widget)
+    {
+      GtkStyleContext *context, *parent_context;
+      const GtkWidgetPath *parent_path;
+      GtkWidgetPath *path;
+
+      context = gtk_widget_get_style_context (GTK_WIDGET (menu));
+      parent_context = gtk_widget_get_style_context (gtk_menu_get_attach_widget (GTK_WIDGET (menu)));
+
+      /* Copy the widget path of the parent,
+       * append the type of the actual menu,
+       * set this path as the new path for the menu. */
+      parent_path = gtk_style_context_get_path (parent_context);
+      path = gtk_widget_path_copy (parent_path);
+      gtk_widget_path_append_type (path, G_OBJECT_TYPE (menu));
+      gtk_style_context_set_path (context, path);
+
+      gtk_widget_path_free (path);
+    }
+
   /* We need to show the menu here rather in the init function
    * because code expects to be able to tell if the menu is onscreen
    * by looking at gtk_widget_get_visible (menu)
