On Wed Apr 16 08:13:29 2025 +0000, Rémi Bernon wrote:
Shouldn't this be changed to dwCompStrLen as well to match the if on line [564](https://gitlab.winehq.org/wine/wine/-/merge_requests/7827/diffs?commit_id=74...) (and [588](https://gitlab.winehq.org/wine/wine/-/merge_requests/7827/diffs?commit_id=74...) changed to an else)? Otherwise if dwCompStrOffset > 0 and dwCompStrLen == 0 we could send an (empty) WM_IME_COMPOSITION message outside of WM_IME_STARTCOMPOSITION/WM_IME_STARTCOMPOSITION? It's purely hypothetical as I don't think it's possible, but I think it's good to keep the conditions consistent.
Yes. This is possible if we handle the empty WM_IME_COMPOSITION handling in the WM_IME_ENDCOMPOSITION part.
As in d1f9aae5, the empty WM_IME_COMPOSITION is wparam==0x1b, lparam==0x1bf, but I left the code in because it was ambiguous.
If ime_to_tascii_ex doesn't update 'compstr' for empty string, I think it should be fine for lparam==0x1lbf.