From: Esme Povirk esme@codeweavers.com
--- dlls/comctl32/syslink.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/dlls/comctl32/syslink.c b/dlls/comctl32/syslink.c index d0bfaf164fc..625c4ff8a4e 100644 --- a/dlls/comctl32/syslink.c +++ b/dlls/comctl32/syslink.c @@ -529,10 +529,27 @@ static HRESULT WINAPI Accessible_accHitTest(IAccessible *iface, LONG left, LONG return E_NOTIMPL; }
+static LRESULT SYSLINK_SendParentNotify (const SYSLINK_INFO *infoPtr, UINT code, const DOC_ITEM *Link, int iLink); + static HRESULT WINAPI Accessible_accDoDefaultAction(IAccessible *iface, VARIANT childid) { - FIXME("%p\n", iface); - return E_NOTIMPL; + SYSLINK_ACC *This = impl_from_IAccessible(iface); + HRESULT hr; + DOC_ITEM* item; + + TRACE("%p, %s\n", iface, debugstr_variant(&childid)); + + hr = Accessible_FindChild(This, childid, &item); + if (FAILED(hr)) + return hr; + + if (!item) + /* Not supported for whole control. */ + return DISP_E_MEMBERNOTFOUND; + + SYSLINK_SendParentNotify(This->infoPtr, NM_CLICK, item, V_I4(&childid) - 1); + + return S_OK; }
static HRESULT WINAPI Accessible_put_accName(IAccessible *iface, VARIANT childid, BSTR name)
From: Esme Povirk esme@codeweavers.com
--- dlls/comctl32/syslink.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/dlls/comctl32/syslink.c b/dlls/comctl32/syslink.c index 625c4ff8a4e..79e379f6907 100644 --- a/dlls/comctl32/syslink.c +++ b/dlls/comctl32/syslink.c @@ -2132,6 +2132,7 @@ static LRESULT WINAPI SysLinkWindowProc(HWND hwnd, UINT message,
case WM_SETTEXT: SYSLINK_SetText(infoPtr, (LPWSTR)lParam); + NotifyWinEvent(EVENT_OBJECT_NAMECHANGE, infoPtr->Self, OBJID_CLIENT, 0); return DefWindowProcW(hwnd, message, wParam, lParam);
case WM_LBUTTONDOWN:
Is there any way to write tests for this? I understand the WinEvent one might be difficult to write a test for, but for `Accessible_accDoDefaultAction()` I'd mostly be curious to confirm that it returns `DISP_E_MEMBERNOTFOUND` since that's a unique return value to me.
On Sun Mar 23 02:04:55 2025 +0000, Connor McAdams wrote:
Is there any way to write tests for this? I understand the WinEvent one might be difficult to write a test for, but for `Accessible_accDoDefaultAction()` I'd mostly be curious to confirm that it returns `DISP_E_MEMBERNOTFOUND` since that's a unique return value to me.
Those should both be reasonable to test. I was going by MSDN for the return value.
On Sun Mar 23 02:04:55 2025 +0000, Esme Povirk wrote:
Those should both be reasonable to test. I was going by MSDN for the return value.
Yep, it's E_INVALIDARG on Windows.
Also, the NAMECHANGE event is for OBJID_WINDOW on Windows, so it may be sent by Win32 and not the SysLink control itself.