[PATCH v3] oleacc: Add support for retrieving an HWND from accNavigate to WindowFromAccessibleObject.

Piotr Caban piotr.caban at gmail.com
Mon May 16 09:03:19 CDT 2022


On 5/16/22 15:53, Connor McAdams wrote:
> On Mon, May 16, 2022 at 09:40:33AM -0400, Connor McAdams wrote:
>> On Sat, May 14, 2022 at 06:54:27PM +0200, Piotr Caban wrote:
>>> Hi Connor,
>>>
>>> I'm afraid it's not moving in right direction. It's partially caused by
>>> returning success and NULL window in some of the tests. While it may be
>>> interesting to test we end testing corner behavior only. Some paths in
>>> native implementation accepts NULL HWND while other not - it may lead to
>>> wrong conclusions.
>>>
>>> What do you think about something like in attached diff (generated on top of
>>> your patch)? Please note that I didn't test it well. It would be good to
>>> understand what SID_AccessibilityUnk is for.
>>>
>>> Thanks,
>>> Piotr
>>
>>
>> Hi Piotr,
>>
>> SID_AccessibilityUnk is used to get the wrapped IAccessible out of the
>> Dynamic Annotation wrapper. This ends up being useful due to the fact
>> that the IAccessible wrapper doesn't pass QI calls to the IAccessible it
>> wraps, which means things like IOleWindow don't get passed through.
>>
>> The diff you've attached looks good. Is it good for you? Would you like
>> more tests around this?
>>
>> Thanks,
>> Connor.
>>
> 
> Oh, just as an example of this: You can test this out in
> test_AccessibleObjectFromEvent, where we have:
> 
> todo_wine ok(!iface_cmp((IUnknown*)acc, (IUnknown*)&Accessible), "acc == &Accessible\n");
> 
> If you query for SID_AccessibilityUnk, you'll get back the &Accessible
> pointer, since AccessibleObjectFromEvent is returning a Dynamic
> Annotation wrapper IAccessible.
Since you have figured it out and it's easy to test I think it will make 
sense to add the test to wine. It doesn't have to be part of the 
WindowFromAccessibleObject patch.

Thanks,
Piotr



More information about the wine-devel mailing list