Index: gtk/gtkmenu.c
===================================================================
--- gtk/gtkmenu.c	(revision 17567)
+++ gtk/gtkmenu.c	(working copy)
@@ -2554,6 +2575,39 @@ gtk_menu_show (GtkWidget *widget)
   GTK_WIDGET_CLASS (gtk_menu_parent_class)->show (widget);
 }
 
+static GtkWidget *
+gtk_menu_find_item (GdkEventButton *event)
+{
+  GtkWidget *menu_item;
+
+  menu_item = gtk_get_event_widget ((GdkEvent*) event);
+
+  while (menu_item && !GTK_IS_MENU_ITEM (menu_item))
+    menu_item = menu_item->parent;
+
+  return menu_item;
+}
+
+static gboolean
+pointer_in_menu_tree (GtkWidget *widget)
+{
+  GtkMenuShell *menu_shell;
+  gint x, y, width, height;
+
+  menu_shell = GTK_MENU_SHELL (widget);
+
+  gdk_window_get_pointer (widget->window, &x, &y, NULL);
+  gdk_drawable_get_size (widget->window, &width, &height);
+
+  if ((x >= 0) && (x < width) && (y >= 0) && (y < height))
+    return TRUE;
+
+  if (GTK_IS_MENU (menu_shell->parent_menu_shell))
+    return pointer_in_menu_tree (menu_shell->parent_menu_shell);
+
+  return FALSE;
+}
+
 static gboolean
 gtk_menu_button_scroll (GtkMenu        *menu,
                         GdkEventButton *event)
@@ -2586,11 +2640,20 @@ gtk_menu_button_press (GtkWidget      *w
   if (event->type != GDK_BUTTON_PRESS)
     return FALSE;
 
-  /* Don't pop down the menu for presses over scroll arrows
+  /* Don't pass down to menu shell for presses over scroll arrows
    */
   if (gtk_menu_button_scroll (GTK_MENU (widget), event))
     return TRUE;
 
+  if (!gtk_menu_find_item (event))
+    {
+      /*  Don't pass down to menu shell if a non-menuitem part of the menu
+       *  was clicked.
+       */
+      if (pointer_in_menu_tree (widget))
+        return TRUE;
+    }
+
   return GTK_WIDGET_CLASS (gtk_menu_parent_class)->button_press_event (widget, event);
 }
 
@@ -2609,11 +2672,20 @@ gtk_menu_button_release (GtkWidget      
   if (event->type != GDK_BUTTON_RELEASE)
     return FALSE;
 
-  /* Don't pop down the menu for releases over scroll arrows
+  /* Don't pass down to menu shell for releases over scroll arrows
    */
   if (gtk_menu_button_scroll (GTK_MENU (widget), event))
     return TRUE;
 
+  if (!gtk_menu_find_item (event))
+    {
+      /*  Don't pass down to menu shell if a non-menuitem part of the menu
+       *  was clicked.
+       */
+      if (pointer_in_menu_tree (widget))
+        return TRUE;
+    }
+
   return GTK_WIDGET_CLASS (gtk_menu_parent_class)->button_release_event (widget, event);
 }
 
