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 371412 - GAIL: Problem with atached menus to widget
GAIL: Problem with atached menus to widget
Status: RESOLVED FIXED
Product: atk
Classification: Platform
Component: gail
1.8.x
Other All
: Normal normal
: ---
Assigned To: bill.haneman
bill.haneman
Depends on:
Blocks:
 
 
Reported: 2006-11-06 08:21 UTC by Marcin Lyko
Modified: 2007-01-03 17:11 UTC
See Also:
GNOME target: ---
GNOME version: 2.11/2.12


Attachments
A small test program which illustrates the problem (2.50 KB, application/octet-stream)
2006-11-06 08:28 UTC, Marcin Lyko
  Details
The patch resolve problems with attached menus to GtkButton (2.57 KB, patch)
2006-12-12 07:34 UTC, Marcin Lyko
committed Details | Review

Description Marcin Lyko 2006-11-06 08:21:50 UTC
Please describe the problem:
Menus(GtkMenu widget) attached to some widget(GtkWidget, GtkMenuItem, etc) by the gtk_menu_attach_to_widget function are not being seen by AT-SPI. It is not possible to access to these menus by AT-SPI. So I started to  analyze the source of GAIL and I found
a reason. It is is_attached_menu_window function in gail/gailtoplevel.c,
which returns TRUE if menus are attached to button, menu itam or opction
menu. Next gail_toplevel_show_event_watcher function doesn't implement
toplevel objects if these objects own menu child attached to button,
menu itam or opction menu. So could someone explain me what for the with
is_attached_menu_window function was added to the GAIL implementation?
Because the one reason I can see it is unvisibility of these menus in
AT-SPI.

Steps to reproduce:
1. Write a simple program with Gtk+, which contains an attached menu to some widget (e.g. GtkButton) by gtk_menu_attach_to_widget function.
2. Compile and run this program, next popup the attached menu.
3. Try to access to the menu using at-spi.

Actual results:
The menu is not being seen by at-spi.

Expected results:
The menu should be able in at-spi.

Does this happen every time?
Yes, it does.

Other information:
By analyzing the source of GAIL, I found a reason of this sytuation. It is is_attached_menu_window function in gail/gailtoplevel.c, which returns TRUE if menus are attached to button, menu itam or opction menu. Next gail_toplevel_show_event_watcher function doesn't implement toplevel objects if these objects own menu child attached to button, menu itam or opction menu.

What for the is_attached_menu_window function is implemented in gail and what for is checked if menu is attached to some widget?
Comment 1 Marcin Lyko 2006-11-06 08:28:50 UTC
Created attachment 76070 [details]
A small test program which illustrates the problem
Comment 2 Marcin Lyko 2006-11-06 08:31:49 UTC
Sorry for duplicate some information in the raport of the bug.
Comment 3 bill.haneman 2006-11-06 15:15:16 UTC
is_attached_menu_window is there to prevent menus which are actually attached to menus from being seen _twice_ in at-spi; that is, such windows should NOT be exposed as "toplevels".

So your problem appears not to be with is_attached_menu_window, but rather the question is why the menu is not appearing as a child of the widget to which it is attached...

Comment 4 Marcin Lyko 2006-11-07 09:42:06 UTC
I supposed that is_attached_menu_window makes sense, but I could guess how. So thanks for the explanation.

But the problem still exists, the attached menus are not being seen in at-spi. Where is the problem, in gtk+ or atk/gail, or maybe in my program?
Comment 5 Marcin Lyko 2006-12-12 07:34:44 UTC
Created attachment 78187 [details] [review]
The patch resolve problems with attached menus to GtkButton
Comment 6 Li Yuan 2006-12-12 08:08:33 UTC
So, the patch fix the problem of menu attached to GtkButton? And there are still problems with menu item or option menu?
Comment 7 Marcin Lyko 2006-12-12 09:28:07 UTC
The patch fixes only the problem of menu attached to GtkButton. I haven't checked what happen with menu attached to menu item and option menu. You must do it by yourself.
Comment 8 bill.haneman 2007-01-03 17:11:20 UTC
Thanks Marcin!