Again, the very first thing I'd suggest to do is to write a comprehensive
test
case and send it to wine-patches with appropriate todo_wine statements to
make
it pass. Then we could see exact steps which lead to a failure and could
start
thinking of a possible fix.
Attached is a set of tests which try to exercise locating via the id parameter when there is a collision between a popup (id == hMenu) and a menu item.
As far as I cal tell if a non-popup exists anywhere in the menu then it is returned, and only if none are found then the popup itself is returned. Can anyone think of any tests I can use to prove or disprove this beyond what is in the attached patch?
My current though on solving this would be to remember any matching popup match but not return it, only using the remembered value if we exit the search having found no matching ids. Anyone object before I submit?
Changelog
Tests for bug#3095 where the menu is incorrect because of duplication of a Menu id and an hMenu
Jason