msctf: Implement ITfKeystrokeMgr::UnpreserveKey.
This commit is contained in:
parent
45c3ff2ff8
commit
a2c7a99471
|
@ -430,7 +430,7 @@ static void test_KeystrokeMgr(void)
|
|||
if (hr == S_FALSE) todo_wine ok(preserved == FALSE,"misreporting preserved key\n");
|
||||
|
||||
hr = ITfKeystrokeMgr_UnpreserveKey(keymgr, &CLSID_PreservedKey,&tfpk);
|
||||
todo_wine ok(hr==CONNECT_E_NOCONNECTION,"ITfKeystrokeMgr_UnpreserveKey inproperly succeeded\n");
|
||||
ok(hr==CONNECT_E_NOCONNECTION,"ITfKeystrokeMgr_UnpreserveKey inproperly succeeded\n");
|
||||
|
||||
hr = ITfKeystrokeMgr_UnadviseKeyEventSink(keymgr,tid);
|
||||
todo_wine ok(SUCCEEDED(hr),"ITfKeystrokeMgr_UnadviseKeyEventSink failed\n");
|
||||
|
|
|
@ -598,8 +598,29 @@ static HRESULT WINAPI KeystrokeMgr_UnpreserveKey(ITfKeystrokeMgr *iface,
|
|||
REFGUID rguid, const TF_PRESERVEDKEY *pprekey)
|
||||
{
|
||||
ThreadMgr *This = impl_from_ITfKeystrokeMgrVtbl(iface);
|
||||
FIXME("STUB:(%p)\n",This);
|
||||
return E_NOTIMPL;
|
||||
PreservedKey* key = NULL;
|
||||
struct list *cursor;
|
||||
TRACE("(%p) %s (%x %x)\n",This,debugstr_guid(rguid),(pprekey)?pprekey->uVKey:0, (pprekey)?pprekey->uModifiers:0);
|
||||
|
||||
if (!pprekey || !rguid)
|
||||
return E_INVALIDARG;
|
||||
|
||||
LIST_FOR_EACH(cursor, &This->CurrentPreservedKeys)
|
||||
{
|
||||
key = LIST_ENTRY(cursor,PreservedKey,entry);
|
||||
if (IsEqualGUID(rguid,&key->guid) && pprekey->uVKey == key->prekey.uVKey && pprekey->uModifiers == key->prekey.uModifiers)
|
||||
break;
|
||||
key = NULL;
|
||||
}
|
||||
|
||||
if (!key)
|
||||
return CONNECT_E_NOCONNECTION;
|
||||
|
||||
list_remove(&key->entry);
|
||||
HeapFree(GetProcessHeap(),0,key->description);
|
||||
HeapFree(GetProcessHeap(),0,key);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI KeystrokeMgr_SetPreservedKeyDescription(ITfKeystrokeMgr *iface,
|
||||
|
|
Loading…
Reference in New Issue