Bugzilla – Bug 503973
pyatspi.generateMouseEvent does not open menu when application window is active
Last modified: 2009-07-02 03:45:56 UTC
PROBLEM STATEMENT The pyatspi.generateMouseEvent method is used to simulate a mouse click on an accessible control. The problem is that when the method is used to simulate a left mouse click on a menu, that menu does not open if the application window is active. If another application window is active when the generateMouseEvent method is issued, the application window that contains the menu being clicked becomes active and the menu opens. REPRO 1. Run uia2atk/test/samples/toolstripmenuitem.py 2. Run the attached pyatspi script from another terminal on the desktop , which does the following: 1. Findd the "Edit" menu of the above application 2. Prompts you to click on the toolstripmenuitem.py title bar (do this) 2. Uses pyatspi.generateMouseEvent to left click on the "Edit" menu RESULTS The "Edit" menu is selected, but does not open EXPECTED RESULTS The "Edit" menu should open COMMANDS This smells like it could be something that needs to be handled upstream. If you want to see the desired behavior, you can simply ignore the attached pyatspi script's request to click on the toolstripmenuitem.py title bar. This will cause the terminal from which the script is running to remain active while the toolstripmenuitem.py application window is inactive.
Created attachment 292259 [details] pyatspi script referenced in REPRO steps
This is true for menus of ToolStrips and MenuStrips, at least.
seems like this bug works for me. just want to add me in the CC list :)
(In reply to comment #3) > seems like this bug works for me. > just want to add me in the CC list :) <@bgmerrell> ray: hey, about bug 503973, did your comment mean that you can duplicate it or that you cannot duplicate it? <@ray> bgmerrell, I have tried the bug, but I can't reproduce it :) <@bgmerrell> ray: what distro/version? what version of GNOME? <@ray> bgmerrell, opensuse 11.1 32bit, gnome 2.24 <@ray> bgmerrell, maybe i missed something <@bgmerrell> interesting. i was using the same thing <@bgmerrell> ray: are you using a VM? <@ray> bgmerrell, no <@bgmerrell> ray: ugh.. maybe this is just like that other generateMouseEvent bug <@bgmerrell> https://bugzilla.novell.com/show_bug.cgi?id=450704 <@ray> bgmerrell, I run the sample script, then run the test script, no matter what window is active, the "Edit" menu pops up finally
More relevant IRC discussion: <@bgmerrell> calen: could you try to reproduce it? <@calen> bgmerrell, hello <@calen> bgmerrell, ok, i will try <@calen> bgmerrell, I also can't reproduce it! Edit menu is opened. <@felicia> hi bgmerrell, bug 503973 can reproduced on my computer <@felicia> Edit menu is not opened, uiaatkbridge-134036-662 <@ray> bgmerrell, interesting, Calen and I can't duplicate it, felicia and you can :) <@bgmerrell> are calen and felicia using VMs? <@felicia> I ‘ m not using VMs <@calen> bgmerrell, not VM,