feat: also sync double/single char status when switch windows
This commit is contained in:
1 parent
25ea1efe39
commit
7890e815de
3 files changed
+15
-4
No files matched your search
@@ -647,10 +647,12 @@ LRESULT CALLBACK CMetasequoiaIME_WindowProc(HWND hWnd, UINT message, WPARAM wPar
|
||||
break;
|
||||
}
|
||||
case WM_ThreadFocus: {
|
||||
/* 通知 server 端更新一下 ftb 中英和标点的状态 */
|
||||
/* 通知 server 端更新一下 ftb 中英、全半角、标点的状态 */
|
||||
SendIMEStatusEventToUIProcessViaNamedPipe( //
|
||||
pIME->GetCompositionProcessorEngine()->GetIMEMode(pIME->_GetThreadMgr(), pIME->_GetClientId()), //
|
||||
pIME->GetCompositionProcessorEngine()->GetPunctuationMode(pIME->_GetThreadMgr(), pIME->_GetClientId()));
|
||||
pIME->GetCompositionProcessorEngine()->GetDoubleSingleByteMode(pIME->_GetThreadMgr(),
|
||||
pIME->_GetClientId()), //
|
||||
pIME->GetCompositionProcessorEngine()->GetPunctuationMode(pIME->_GetThreadMgr(), pIME->_GetClientId())); //
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
||||
+10
-1
@@ -945,10 +945,11 @@ int SendIMEActivationEventToUIProcessViaNamedPipe()
|
||||
* @brief Send IME status to UI process via named pipe
|
||||
*
|
||||
* @param kbdIsOpen
|
||||
* @param fullwidthIsOpen
|
||||
* @param puncIsOpen
|
||||
* @return int
|
||||
*/
|
||||
int SendIMEStatusEventToUIProcessViaNamedPipe(bool kbdIsOpen, bool puncIsOpen)
|
||||
int SendIMEStatusEventToUIProcessViaNamedPipe(bool kbdIsOpen, bool fullwidthIsOpen, bool puncIsOpen)
|
||||
{
|
||||
std::wstring status = L"ftbStatus";
|
||||
if (kbdIsOpen)
|
||||
@@ -959,6 +960,14 @@ int SendIMEStatusEventToUIProcessViaNamedPipe(bool kbdIsOpen, bool puncIsOpen)
|
||||
{
|
||||
status += L"0";
|
||||
}
|
||||
if (fullwidthIsOpen)
|
||||
{
|
||||
status += L"1";
|
||||
}
|
||||
else
|
||||
{
|
||||
status += L"0";
|
||||
}
|
||||
if (puncIsOpen)
|
||||
{
|
||||
status += L"1";
|
||||
|
||||
+1
-1
@@ -117,7 +117,7 @@ int SendMoveCandidateWndEventToUIProcess();
|
||||
int SendLangbarRightClickEventToUIProcess(const RECT *prcArea);
|
||||
int SendIMEActivationEventToUIProcessViaNamedPipe();
|
||||
int SendIMEDeactivationEventToUIProcessViaNamedPipe();
|
||||
int SendIMEStatusEventToUIProcessViaNamedPipe(bool kbdIsOpen, bool puncIsOpen);
|
||||
int SendIMEStatusEventToUIProcessViaNamedPipe(bool kbdIsOpen, bool fullwidthIsOpen, bool puncIsOpen);
|
||||
int SendIMESwitchEventToUIProcessViaNamedPipe(UINT uImeStatus);
|
||||
int SendPuncSwitchEventToUIProcessViaNamedPipe(BOOL isPunc);
|
||||
int SendDoubleSingleByteSwitchEventToUIProcessViaNamedPipe(BOOL isDoubleSingleByte);
|
||||
|
||||
Reference in new issue
Block a user