diff --git a/t/GtkMenu.t b/t/GtkMenu.t
index 96c6f6d..494edaf 100644
--- a/t/GtkMenu.t
+++ b/t/GtkMenu.t
@@ -8,7 +8,7 @@
 # 	- rm
 #########################
 
-use Gtk2::TestHelper tests => 57;
+use Gtk2::TestHelper tests => 58;
 
 ok( my $menubar = Gtk2::MenuBar->new );
 
@@ -131,6 +131,17 @@ unless ($i_know_you) {
 	}
 }
 
+{
+  my $popup_runs = 0;
+  my $saw_warning = '';
+  $SIG{__WARN__} = sub { $saw_warning = $_[0] };
+  $menu->popup(undef, undef, sub { die }, undef, 1, 0);
+  diag "popup position runs=$popup_runs warn='$saw_warning'";
+  $menu->popdown;
+  ok ($popup_runs || $saw_warning,
+      'popup positioning die() is not fatal');
+}
+
 SKIP: {
 	skip 'new 2.14 stuff', 2
 		unless Gtk2->CHECK_VERSION(2, 14, 0);
@@ -145,5 +156,5 @@ SKIP: {
 
 __END__
 
-Copyright (C) 2003 by the gtk2-perl team (see the file AUTHORS for the
+Copyright (C) 2003, 2010 by the gtk2-perl team (see the file AUTHORS for the
 full list).  See LICENSE for more information.
diff --git a/xs/GtkMenu.xs b/xs/GtkMenu.xs
index 70af96a..3c9fa6b 100644
--- a/xs/GtkMenu.xs
+++ b/xs/GtkMenu.xs
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003-2005 by the gtk2-perl team (see the file AUTHORS)
+ * Copyright (c) 2003-2005, 2010 by the gtk2-perl team (see the file AUTHORS)
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -57,24 +57,34 @@ gtk2perl_menu_position_func (GtkMenu * menu,
 	if (callback->data)
 		XPUSHs (sv_2mortal (newSVsv (callback->data)));
 
-	PUTBACK;
-
-	n = call_sv (callback->func, G_ARRAY);
+        /* A die() from callback->func is suspected to be bad or very bad.
+           Circa Gtk 2.18 a jump out of $menu->popup seems to leave an X
+           grab with no way to get rid of it (no keyboard Esc, and no mouse
+           click handlers).  The position func can also be called later for
+           things like resizing or move to a different GdkScreen, and such a
+           call presumably comes straight from the main loop, where a die()
+           would jump out of Gtk2->main.  */
 
+	PUTBACK;
+        n = call_sv (callback->func, G_ARRAY | G_EVAL);
 	SPAGAIN;
 
-	if (n < 2 || n > 3)
-		croak ("menu position callback must return two integers "
-		       "(x, and y) or two integers and a boolean (x, y, and "
-		       "push_in)");
-
-	/* POPs and POPi take things off the *end* of the stack! */
-	if (n > 2) {
-		SV *sv = POPs;
-		*push_in = sv_2bool (sv);
-	}
-	if (n > 1) *y = POPi;
-	if (n > 0) *x = POPi;
+        if (SvTRUE (ERRSV)) {
+                g_warning ("Ignoring error in menu position function: %s",
+                           SvPVutf8_nolen (ERRSV));
+        } else if (n < 2 || n > 3) {
+		g_warning ("menu position callback must return two integers "
+                           "(x, and y) or two integers and a boolean "
+                           "(x, y, and push_in)");
+        } else {
+                /* POPs and POPi take things off the *end* of the stack! */
+                if (n > 2) {
+                        SV *sv = POPs;
+                        *push_in = sv_2bool (sv);
+                }
+                if (n > 1) *y = POPi;
+                if (n > 0) *x = POPi;
+        }
 
 	PUTBACK;
 	FREETMPS;
