• R/O
  • HTTP
  • SSH
  • HTTPS

xkeymacs: Commit


Commit MetaInfo

Revision0f23935791570d87cb69dc7463e826dbaa72343e (tree)
Time2018-04-01 16:34:34
AuthorKazuhiro Fujieda <fujieda@user...>
CommiterKazuhiro Fujieda

Log Message

Retry CoInitializeEx on its failure

Change Summary

Incremental Difference

--- a/xkeymacsdll/TSFHandler.cpp
+++ b/xkeymacsdll/TSFHandler.cpp
@@ -32,9 +32,6 @@ void TSFHandler::InitSink()
3232 {
3333 if (TLS::GetTSFHandler())
3434 return;
35- TSFHandler *tsfh = new TSFHandler();
36- TLS::PutTSFHandler(tsfh);
37-
3835 HRESULT hr = CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);
3936 if (FAILED(hr)) {
4037 DebugLog(_T("CoInitializeEx failed."));
@@ -47,6 +44,8 @@ void TSFHandler::InitSink()
4744 DebugLog(_T("CoCreateInstance for ThreadMgr failed."));
4845 return;
4946 }
47+ TSFHandler *tsfh = new TSFHandler();
48+ TLS::PutTSFHandler(tsfh);
5049 tsfh->m_ThreadMgr = thread;
5150 ITfSource *src;
5251 if (FAILED(thread->QueryInterface(&src))) {
Show on old repository browser