RFR: 8305418: [Linux] Replace obsolete XIM as Input Method Editor [v31]
Martin Fox
mfox at openjdk.org
Sun Dec 15 20:59:51 UTC 2024
On Sun, 15 Dec 2024 20:26:22 GMT, Thiago Milczarek Sayao <tsayao at openjdk.org> wrote:
>> This option sets if editing happens on the application or in the IME window.
>>
>> Application:
>> 
>>
>>
>> IME Window:
>> 
>
> I modified it to no longer rely on pre-edit calls, but I'm not sure if it's working as expected yet.
When fcitx is configured this way we never receive pre-editing signals AND we're not filtering a key event when the commit comes in. The best way to test this is to use the mouse to click on a choice in the IM window. You'll see a commit arrive even though no key was pressed (which is expected) and no pre-edit signals were sent (which is unexpected).
On the one hand according to the GTK documentation this set of conditions should never happen. On the other hand this is Linux.
I'll look at this code in more detail but I think you're comparing the commit text with the keyval of the previous key event which may be unrelated. The simplest solution is to add a flag that's only set while a key event is being filtered. If a commit message arrives during pre-edit OR when no key event is being filtered it should be processed as an InputMethod event. I did a quick test of this logic and it seems to work but I did very little testing.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1080#discussion_r1885860305
More information about the openjfx-dev
mailing list