[PATCH v4 2/3] winex11: Clear only non-empty existing Composition String.
Akihiro Sagawa
sagawa.aki at gmail.com
Sun Apr 10 06:52:15 CDT 2022
On Fri, 8 Apr 2022 21:45:40 +0900, Byeongsik Jeon wrote:
[...]
> @@ -1040,7 +1046,7 @@ void IME_SetResultString(LPWSTR lpResult, DWORD dwResultLen)
> inComp = myPrivate->bInComposition;
> ImmUnlockIMCC(lpIMC->hPrivate);
>
> - if (!inComp)
> + if (!inComp && compstr_len)
> {
> ImmSetOpenStatus(imc, TRUE);
> GenerateIMEMessage(imc, WM_IME_STARTCOMPOSITION, 0, 0);
> @@ -1050,7 +1056,7 @@ void IME_SetResultString(LPWSTR lpResult, DWORD dwResultLen)
> GenerateIMEMessage(imc, WM_IME_COMPOSITION, lpResult[0], GCS_RESULTSTR|GCS_RESULTCLAUSE);
> GenerateIMEMessage(imc, WM_IME_ENDCOMPOSITION, 0, 0);
>
> - if (!inComp)
> + if (!inComp && compstr_len)
> ImmSetOpenStatus(imc, FALSE);
>
> ImmUnlockIMC(imc);
Hi,
From my point of view, the purpose of these !inComp blocks is
to synchronize the status when root window style is used, i.e. no
preedit callbacks happen. Moreover, the composition string length is
mostly zero unless XIMPreEditDrawCallback is called.
I'd suggest you to omit status updates if the preedit callback is used
before.
I leave the review of other two patches to the maintainers because I'm
not familiar with X event handlers.
Akihiro Sagawa
More information about the wine-devel
mailing list