msctf: Implement ITfKeystrokeMgr::UnadviseKeyEventSink.

This commit is contained in:
Aric Stewart 2009-05-08 08:51:07 -05:00 committed by Alexandre Julliard
parent f20c4d69c9
commit 161fa4bc30
2 changed files with 26 additions and 3 deletions

View file

@ -437,7 +437,7 @@ static void test_KeystrokeMgr(void)
ok(hr==CONNECT_E_NOCONNECTION,"ITfKeystrokeMgr_UnpreserveKey inproperly succeeded\n");
hr = ITfKeystrokeMgr_UnadviseKeyEventSink(keymgr,tid);
todo_wine ok(SUCCEEDED(hr),"ITfKeystrokeMgr_UnadviseKeyEventSink failed\n");
ok(SUCCEEDED(hr),"ITfKeystrokeMgr_UnadviseKeyEventSink failed\n");
ITfKeystrokeMgr_Release(keymgr);
ITfKeyEventSink_Release(sink);

View file

@ -546,8 +546,31 @@ static HRESULT WINAPI KeystrokeMgr_UnadviseKeyEventSink(ITfKeystrokeMgr *iface,
TfClientId tid)
{
ThreadMgr *This = impl_from_ITfKeystrokeMgrVtbl(iface);
FIXME("STUB:(%p)\n",This);
return E_NOTIMPL;
CLSID textservice;
ITfKeyEventSink *check = NULL;
TRACE("(%p) %x\n",This,tid);
if (!tid)
return E_INVALIDARG;
textservice = get_textservice_clsid(tid);
if (IsEqualCLSID(&GUID_NULL,&textservice))
return E_INVALIDARG;
get_textservice_sink(tid, &IID_ITfKeyEventSink, (IUnknown**)&check);
if (!check)
return CONNECT_E_NOCONNECTION;
set_textservice_sink(tid, &IID_ITfKeyEventSink, NULL);
ITfKeyEventSink_Release(check);
if (This->forgroundKeyEventSink == check)
{
ITfKeyEventSink_Release(This->forgroundKeyEventSink);
This->forgroundKeyEventSink = NULL;
}
return S_OK;
}
static HRESULT WINAPI KeystrokeMgr_GetForeground(ITfKeystrokeMgr *iface,