After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 695488 - GtkMenuItem signal "activate" not fired inside a submenu when parent is not clicked
GtkMenuItem signal "activate" not fired inside a submenu when parent is not c...
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Widget: GtkMenu
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2013-03-09 11:23 UTC by Thomas Perl
Modified: 2018-04-14 23:56 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Thomas Perl 2013-03-09 11:23:13 UTC
Due to a focus issue(?), a GtkMenuItem placed inside a GtkMenu that has been set as "submenu" of another GtkMenuItem doesn't fire its "activate" signal when it is clicked when the parent GtkMenuItem is not clicked before.

Basic setup:
 - GtkMenuItem (parent menu)
   - GtkMenu (set as submenu of parent menu)
     - GtkMenuItem -> "activate"
 
Scenario 1:

 1. Open a popup menu
 2. Hover (don't click!) on the parent item
 3. Click on the child item
 4.a Expected result: "activate" is fired
 4.b Actual result: "activate" is not fired

Scenario 2:

 1. Open a popup menu
 2. Click (with the mouse, not just hover) on the parent item
 3. Click on the child item
 4. "activate" is fired as expected

Scenario 3:

 1. Open a popup menu
 2. Navigate to the child item using the keyboard, press Enter
 3. "activate" is fired as expected

This is at least still the case with gtk+ 2.24.10-0ubuntu6. I've searched for a similar bug, but haven't found one here (search terms: submenu, activate).

Example code and current workaround:
http://stackoverflow.com/questions/5221326/submenu-item-does-not-call-function-with-working-solution/
http://web.archive.org/web/20070526022349/http://www.kadjo.net/softdev/?p=54
Comment 1 Matthias Clasen 2018-02-10 05:11:51 UTC
We're moving to gitlab! As part of this move, we are moving bugs to NEEDINFO if they haven't seen activity in more than a year. If this issue is still important to you and still relevant with GTK+ 3.22 or master, please reopen it and we will migrate it to gitlab.
Comment 2 Matthias Clasen 2018-04-14 23:56:39 UTC
As announced a while ago, we are migrating to gitlab, and bugs that haven't seen activity in the last year or so will be not be migrated, but closed out in bugzilla.

If this bug is still relevant to you, you can open a new issue describing the symptoms and how to reproduce it with gtk 3.22.x or master in gitlab:

https://gitlab.gnome.org/GNOME/gtk/issues/new