Subject: bug#16565: 24.3.50; x-popup-menu just returns nil

From: Michael Heerdegen <[email-masked]>
Date: Tue, 28 Jan 2014 04:11:42 +0100

Michael Heerdegen <[email-masked]> writes:

> Will try to do that today, thanks.

Ok, I tried to do my best to understand the C code and GUD.

If I understand correctly, this is executed for me:

    selection = xmenu_show (f, xpos, ypos, for_click,
			    keymaps, title, &error_name);

In the good case, SELECTION is bound to different integers, in the bad
case, it is always the same integer, which seems to mean "nil".

But there is a difference in the arguments of the xmenu_show call.  In
the bad case calling with an event:

  (x-popup-menu event (mouse-menu-bar-map))

FOR_CLICK is bound to true.  In the good case with

  (x-popup-menu t (mouse-menu-bar-map))

FOR_CLICK is bound to false.

That made me wonder what happened when I bind `foo' to a mouse-down
event.  Then the bug doesn't happen, `foo' doesn't return nil.

HTH,

Michael.