[ipc]: Init/Uninit ipc in SetFocus instead of SetThreadFocus
This commit is contained in:
1 parent
70dc459cc6
commit
111df26719
6 files changed
+51
-42
No files matched your search
@@ -2,6 +2,7 @@
|
||||
#include "Globals.h"
|
||||
#include "MetasequoiaIME.h"
|
||||
#include "CandidateListUIPresenter.h"
|
||||
#include "Ipc.h"
|
||||
|
||||
//+---------------------------------------------------------------------------
|
||||
//
|
||||
@@ -44,6 +45,18 @@ STDAPI CMetasequoiaIME::OnSetFocus(_In_ ITfDocumentMgr *pDocMgrFocus, _In_ ITfDo
|
||||
{
|
||||
pDocMgrPrevFocus;
|
||||
|
||||
if (pDocMgrFocus && !Global::g_connected)
|
||||
{
|
||||
|
||||
InitNamedpipe();
|
||||
Global::g_connected = true;
|
||||
}
|
||||
else if (!pDocMgrFocus && Global::g_connected)
|
||||
{
|
||||
CloseNamedpipe();
|
||||
Global::g_connected = false;
|
||||
}
|
||||
|
||||
_InitTextEditSink(pDocMgrFocus);
|
||||
|
||||
_UpdateLanguageBarOnSetFocus(pDocMgrFocus);
|
||||
|
||||
Reference in new issue
Block a user