winex11.drv: Handle result string directly.
This commit is contained in:
parent
d3aa514a2d
commit
4ccbcb02b2
|
@ -1049,9 +1049,22 @@ BOOL IME_SetCompositionString(DWORD dwIndex, LPCVOID lpComp, DWORD dwCompLen,
|
|||
lpRead, dwReadLen);
|
||||
}
|
||||
|
||||
BOOL IME_NotifyIME(DWORD dwAction, DWORD dwIndex, DWORD dwValue)
|
||||
void IME_SetResultString(LPWSTR lpResult, DWORD dwResultLen)
|
||||
{
|
||||
return NotifyIME(FROM_X11, dwAction, dwIndex, dwValue);
|
||||
LPINPUTCONTEXT lpIMC;
|
||||
HIMCC newCompStr;
|
||||
|
||||
lpIMC = LockRealIMC(FROM_X11);
|
||||
if (lpIMC == NULL)
|
||||
return;
|
||||
|
||||
newCompStr = updateResultStr(lpIMC->hCompStr, lpResult, dwResultLen);
|
||||
ImmDestroyIMCC(lpIMC->hCompStr);
|
||||
lpIMC->hCompStr = newCompStr;
|
||||
|
||||
GenerateIMEMessage(FROM_X11, WM_IME_COMPOSITION, 0, GCS_RESULTSTR);
|
||||
|
||||
UnlockRealIMC(FROM_X11);
|
||||
}
|
||||
|
||||
/*****
|
||||
|
|
|
@ -307,7 +307,7 @@ extern void IME_UpdateAssociation(HWND focus);
|
|||
extern BOOL IME_SetCompositionString(DWORD dwIndex, LPCVOID lpComp,
|
||||
DWORD dwCompLen, LPCVOID lpRead,
|
||||
DWORD dwReadLen);
|
||||
extern BOOL IME_NotifyIME(DWORD dwAction, DWORD dwIndex, DWORD dwValue);
|
||||
extern void IME_SetResultString(LPWSTR lpResult, DWORD dwResultlen);
|
||||
|
||||
extern void X11DRV_XDND_EnterEvent( HWND hWnd, XClientMessageEvent *event );
|
||||
extern void X11DRV_XDND_PositionEvent( HWND hWnd, XClientMessageEvent *event );
|
||||
|
|
|
@ -116,9 +116,7 @@ void X11DRV_XIMLookupChars( const char *str, DWORD count )
|
|||
if ((focus = GetFocus()))
|
||||
IME_UpdateAssociation(focus);
|
||||
|
||||
IME_SetCompositionString(SCS_SETSTR, wcOutput,
|
||||
sizeof (WCHAR) * dwOutput, NULL, 0);
|
||||
IME_NotifyIME(NI_COMPOSITIONSTR, CPS_COMPLETE, 0);
|
||||
IME_SetResultString(wcOutput, dwOutput);
|
||||
HeapFree(GetProcessHeap(), 0, wcOutput);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue