Index: src/core/display.c
===================================================================
--- src/core/display.c	(revision 3944)
+++ src/core/display.c	(working copy)
@@ -77,6 +77,7 @@
 #include <X11/extensions/Xfixes.h>
 #endif
 #include <string.h>
+#include "gdk/gdkdisplay.h"
 
 #define GRAB_OP_IS_WINDOW_SWITCH(g)                     \
         (g == META_GRAB_OP_KEYBOARD_TABBING_NORMAL  ||  \
@@ -1777,9 +1778,40 @@
         }
       break;
     case ButtonRelease:
-      if (display->grab_window == window &&
-          grab_op_is_mouse (display->grab_op))
-        meta_window_handle_mouse_grab_op_event (window, event);
+      if (display->grab_window == window)
+         {
+           if (grab_op_is_mouse (display->grab_op))
+             meta_window_handle_mouse_grab_op_event (window, event);
+           else if (display->grab_op == META_GRAB_OP_CLICKING_MENU)
+             {
+               /* Close on double-clicking menu (#83892).
+                *
+                * We can't rely on GTK's idea of what a double-click is
+                * here, since we're on our own during a grab. And X itself
+                * doesn't grok the concept of double-clicks. So we keep a
+                * track of when they last clicked on the menu button...
+                */
+               static unsigned long previous_menu_click = 0;
+
+               gint click_delay = event->xbutton.time - previous_menu_click;
+               previous_menu_click = event->xbutton.time;
+ 
+               /* But we *can* ask GDK how long it thinks a double-click
+                * should take.
+                */
+               if (click_delay <= (gint) gdk_display_get_default()->
+                                                         double_click_time &&
+                   click_delay >= 0 /* being careful of wraps */ )
+                 {
+                   /* Okay, so they double-clicked the menu button. */
+                   meta_display_end_grab_op (display,
+                                             event->xbutton.time);
+ 
+                   if (window && window->has_close_func)
+                     meta_window_delete (window, event->xbutton.time);
+                 }
+             }
+         }
       break;
     case MotionNotify:
       if (display->grab_window == window &&
