[MSCTF] Sync with Wine Staging 3.9. CORE-14656

This commit is contained in:
Amine Khaldi 2018-06-04 03:41:08 +01:00
parent 217390ae60
commit 4335e46944
4 changed files with 16 additions and 5 deletions

View file

@ -621,6 +621,13 @@ static HRESULT WINAPI ThreadMgrSource_AdviseSink(ITfSource *iface,
return advise_sink(&This->ThreadFocusSink, &IID_ITfThreadFocusSink, COOKIE_MAGIC_THREADFOCUSSINK, punk, pdwCookie);
}
if (IsEqualIID(riid, &IID_ITfKeyTraceEventSink))
{
WARN("semi-stub for ITfKeyTraceEventSink: sink won't be used.\n");
return advise_sink(&This->KeyTraceEventSink, &IID_ITfKeyTraceEventSink,
COOKIE_MAGIC_KEYTRACESINK, punk, pdwCookie);
}
FIXME("(%p) Unhandled Sink: %s\n",This,debugstr_guid(riid));
return E_NOTIMPL;
}
@ -628,10 +635,13 @@ static HRESULT WINAPI ThreadMgrSource_AdviseSink(ITfSource *iface,
static HRESULT WINAPI ThreadMgrSource_UnadviseSink(ITfSource *iface, DWORD pdwCookie)
{
ThreadMgr *This = impl_from_ITfSource(iface);
DWORD magic;
TRACE("(%p) %x\n",This,pdwCookie);
if (get_Cookie_magic(pdwCookie) != COOKIE_MAGIC_TMSINK && get_Cookie_magic(pdwCookie) != COOKIE_MAGIC_THREADFOCUSSINK)
magic = get_Cookie_magic(pdwCookie);
if (magic != COOKIE_MAGIC_TMSINK && magic != COOKIE_MAGIC_THREADFOCUSSINK
&& magic != COOKIE_MAGIC_KEYTRACESINK)
return E_INVALIDARG;
return unadvise_sink(pdwCookie);