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

From: Eli Zaretskii <[email-masked]>
Date: Mon, 27 Jan 2014 18:10:31 +0200

> From: Michael Heerdegen <[email-masked]>
> Date: Mon, 27 Jan 2014 03:50:37 +0100
> 
> 
> (defun foo (event)
>   (interactive "e")
>   (message "%s" (x-popup-menu event (mouse-menu-bar-map))))
>  
> (global-set-key
>  [(meta control mouse-3)] ;just some free key
>  #'foo)
> --8<---------------cut here---------------end--------------->8---
> 
> Now, I hit M-C-mouse-3 somewhere.  The menu appears at the right place.
> I select any item, and FOO messages "nil" instead of a list of events.
> This is the bug.
> 
> However, when I redefine FOO so that it uses t instead of EVENT as first
> argument of `x-popup-menu', it works as expected!
> 
> The problem seems to be system specific.  I see it on Debian Linux with
> X, Drew Adams doesn't see it under Windows.

Popup menus are toolkit-dependent, and you are using GTK3.  If you
want to try other toolkits, try Lucid or no-toolkit configuration.
(I confirm that the problem doesn't happen on MS-Windows.)

To find out what is going on, step with a debugger int x-popup-menu,
and see why it returns nil.  My guess would be that the menu callback
is not called for some reason, or maybe some other calamity.

Alternatively, if older versions don't show this behavior, try
bisecting.