mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 10:41:12 +00:00
msctf: Implement ITfKeystrokeMgr::UnadviseKeyEventSink.
This commit is contained in:
parent
f20c4d69c9
commit
161fa4bc30
2 changed files with 26 additions and 3 deletions
|
@ -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);
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue