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

From: Eli Zaretskii <[email-masked]>
Date: Tue, 28 Jan 2014 18:31:17 +0200

> From: Michael Heerdegen <[email-masked]>
> Cc: [email-masked]
> Date: Tue, 28 Jan 2014 06:39:59 +0100
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> > If you start GDB in the src directory, or let it otherwise read the
> > file src/.gdbinit, you can know for sure: the "xtype" command will
> > tell you what kind of Lisp data is in 'selection':
> >
> >   (gdb) p selection
> >   (gdb) xtype
> >
> > If "xtype" says it's a Lisp symbol, another command "xsymbol" will
> > tell you what symbol is that, it will say "nil" if it is nil.
> 
> I don't have a command xtype, only ptype.  What do I miss?

The first part of my instructions: either invoke GDB from the src
directory, or type this inside GDB:

  (gdb) source /path/to/src/.gdbinit

(It is possible that automatic loading of .gdbinit failed because
latest GDB versions refuse to load these init files by default.)

> Anyway, the mouse tooltip over Qnil shows the same integer.
> 
> So I think xmenu_show returns nil in the bad case.

Yes.

> I continued debugging xmenu_show and found that after the call to
> `create_and_show_popup_menu', `menu_item_selection' is only != 0 in the
> good case.

Perhaps Jan could help us out, then.  Jan, it sounds like GTK doesn't
like what we do with the menu, for some reason.

Thanks.