Commit e73b17d0 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

msctf: Context initialization happens before OnPushContext sink.

parent 2dd5a3be
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment