Hi Jeon,
I tested your code with riched20 ( wine ver, windows ver )
For example, trying to type "가나" words.
following messages generated.
WM_IME_STARTCOMPOSITION GCS_COMPSTR L"\3131" GCS_COMPSTR L"\ac00" GCS_COMPSTR L"\ac04" GCS_COMPSTR L"" GCS_RESULTSTR L"\ac00" WM_IME_ENDCOMPOSITION GCS_COMPSTR L"\b098"
In the above scenario, STARTCCOMPOSITION does not occur after ENDCOMPOSITION.
in that result, "나" needs to selection. but, it isn't.
In most cases, the location of the Cursor is specified for STARTCOMPOSITION, and in ENDCOMPOSITION, the input operation is completed.
therefore, other problems arise.
Regards,.
Alex
On 22. 4. 11. 19:07, Byeongsik Jeon wrote:
Hi,
Actually, I don't know why.
### xim server sended event sequence ### preedit start:: preedit draw:: caret 1 chg_first 0 chg_length 0 string 'ㄱ' preedit draw:: caret 1 chg_first 0 chg_length 1 string '가' preedit draw:: caret 1 chg_first 0 chg_length 1 string '간' preedit draw:: caret 0 chg_first 0 chg_length 1 NULL preedit done:: lookup chars:: keycode 0 string 3 '가' <== HERE 1 preedit start:: <== HERE 2 preedit draw:: caret 1 chg_first 0 chg_length 0 string '나' <== HERE 3
I'm not sure, but if I guess. By "[PATCH v4 1/3]" issue, the sequence of events changes as follows:
### current Wine process_events() simulated event sequence ### preedit start:: preedit draw:: caret 1 chg_first 0 chg_length 0 string 'ㄱ' preedit draw:: caret 1 chg_first 0 chg_length 1 string '가' preedit draw:: caret 1 chg_first 0 chg_length 1 string '간' preedit draw:: caret 0 chg_first 0 chg_length 1 NULL preedit done:: preedit start:: <== HERE 4 preedit draw:: caret 1 chg_first 0 chg_length 0 string '나' <== HERE 5 lookup chars:: keycode 0 string 3 '가' <== HERE 6
IME_SetResultString() is in "HERE 6".
At this time, it is "inComp = TRUE" and WM_IME_STARTCOMPOSITION occurred. it may be thought that WM_IME_ENDCOMPOSITION is necessary.
When it and "if (!inComp) GenerateIMEMessage(imc, WM_IME_ENDCOMPOSITION, 0, 0);" combine, WM_IME_ENDCOMPOSITION come out of 'if'.
It's just guess.