msctf: Context initialization happens before OnPushContext sink.
This commit is contained in:
parent
2dd5a3bea2
commit
e73b17d018
|
@ -145,8 +145,8 @@ static HRESULT WINAPI DocumentMgr_Push(ITfDocumentMgr *iface, ITfContext *pic)
|
|||
This->contextStack[1] = This->contextStack[0];
|
||||
This->contextStack[0] = check;
|
||||
|
||||
ITfThreadMgrEventSink_OnPushContext(This->ThreadMgrSink,check);
|
||||
Context_Initialize(check, iface);
|
||||
ITfThreadMgrEventSink_OnPushContext(This->ThreadMgrSink,check);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
|
|
@ -439,6 +439,20 @@ ITfDocumentMgr *pdimFocus, ITfDocumentMgr *pdimPrevFocus)
|
|||
static HRESULT WINAPI ThreadMgrEventSink_OnPushContext(ITfThreadMgrEventSink *iface,
|
||||
ITfContext *pic)
|
||||
{
|
||||
HRESULT hr;
|
||||
ITfDocumentMgr *docmgr;
|
||||
ITfContext *test;
|
||||
|
||||
hr = ITfContext_GetDocumentMgr(pic,&docmgr);
|
||||
ok(SUCCEEDED(hr),"GetDocumenMgr failed\n");
|
||||
test = (ITfContext*)0xdeadbeef;
|
||||
ITfDocumentMgr_Release(docmgr);
|
||||
hr = ITfDocumentMgr_GetTop(docmgr,&test);
|
||||
ok(SUCCEEDED(hr),"GetTop failed\n");
|
||||
ok(test == pic, "Wrong context is on top\n");
|
||||
if (test)
|
||||
ITfContext_Release(test);
|
||||
|
||||
ok(test_OnPushContext == SINK_EXPECTED, "Unexpected OnPushContext sink\n");
|
||||
test_OnPushContext = SINK_FIRED;
|
||||
return S_OK;
|
||||
|
|
Loading…
Reference in New Issue