Module: wine Branch: master Commit: e73b17d018318d0e257ceb8409c4f0e0209a6a1d URL: http://source.winehq.org/git/wine.git/?a=commit;h=e73b17d018318d0e257ceb8409...
Author: Aric Stewart aric@codeweavers.com Date: Wed Jun 24 17:29:51 2009 +0900
msctf: Context initialization happens before OnPushContext sink.
---
dlls/msctf/documentmgr.c | 2 +- dlls/msctf/tests/inputprocessor.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/dlls/msctf/documentmgr.c b/dlls/msctf/documentmgr.c index c7aa820..f5ea71f 100644 --- a/dlls/msctf/documentmgr.c +++ b/dlls/msctf/documentmgr.c @@ -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; } diff --git a/dlls/msctf/tests/inputprocessor.c b/dlls/msctf/tests/inputprocessor.c index 61389cf..b9f2469 100644 --- a/dlls/msctf/tests/inputprocessor.c +++ b/dlls/msctf/tests/inputprocessor.c @@ -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;