| Summary: | X11+IBus: SDL2 should post SDL_TEXTEDITING when preedit is cancelled by hitting Backspaces | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Kengo Ide <kasumikagari> |
| Component: | video | Assignee: | Ryan C. Gordon <icculus> |
| Status: | REOPENED --- | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | alex, gajo01, icculus, sezeroz |
| Version: | 2.0.3 | Keywords: | target-2.0.4, triage-2.0.4 |
| Hardware: | x86 | ||
| OS: | Linux | ||
| Attachments: |
Correctly send TEXTEDITING events.
Fix empty SDL_TEXTEDITING spam + only register interest in messages for ourselves. |
||
Created attachment 2012 [details]
Correctly send TEXTEDITING events.
Here is a patch that should fix the bug.
It also causes IBus to send multiple empty TEXTEDITING events when window focus changes - not sure if that is intended behaviour but it probably shouldn't hurt.
Marking a large number of bugs with the "triage-2.0.4" keyword at once. Sorry if you got a lot of email from this. This is to help me sort through some bugs in regards to a 2.0.4 release. We may or may not fix this bug for 2.0.4, though! Created attachment 2053 [details]
Fix empty SDL_TEXTEDITING spam + only register interest in messages for ourselves.
I fixed the empty SDL_TEXTEDITING event spam that was occuring with the other patch here. This also fixes recieving IBus events not aimed at us, and should definitely be included in 2.0.4 if the other IBus stuff is.
(In reply to Alex Baines from comment #1) > Here is a patch that should fix the bug. This patch is now https://hg.libsdl.org/SDL/rev/b1e7169d1dcb. --ryan. (In reply to Alex Baines from comment #3) > I fixed the empty SDL_TEXTEDITING event spam that was occuring with the > other patch here. This also fixes recieving IBus events not aimed at us, and > should definitely be included in 2.0.4 if the other IBus stuff is. This patch is now https://hg.libsdl.org/SDL/rev/9d4917e2d909, thanks! Resolving the bug... --ryan. I verified that the bug is now fixed at r9652. Thank you. I have this exact same issue with fcitx in r11826. Reopening. |
Shown below are SDL_TEXTEDITING events while typing i-ro-ha in Japanese, then deleting it by Backspace key. Windows: SDL_TEXTEDITING {timestamp=2982, "い", start=1, length=0} SDL_TEXTEDITING {timestamp=3247, "いr", start=2, length=0} SDL_TEXTEDITING {timestamp=3341, "いろ", start=2, length=0} SDL_TEXTEDITING {timestamp=3497, "いろh", start=3, length=0} SDL_TEXTEDITING {timestamp=3592, "いろは", start=3, length=0} SDL_TEXTEDITING {timestamp=4121, "いろ", start=2, length=0} SDL_TEXTEDITING {timestamp=4355, "い", start=1, length=0} SDL_TEXTEDITING {timestamp=4618, "", start=0, length=0} X11+IBus: SDL_TEXTEDITING {timestamp=4725, "い", start=0, length=1} SDL_TEXTEDITING {timestamp=5394, "いr", start=0, length=2} SDL_TEXTEDITING {timestamp=5726, "いろ", start=0, length=2} SDL_TEXTEDITING {timestamp=6059, "いろh", start=0, length=3} SDL_TEXTEDITING {timestamp=6318, "いろは", start=0, length=3} SDL_TEXTEDITING {timestamp=9246, "いろ", start=0, length=2} SDL_TEXTEDITING {timestamp=9805, "い", start=0, length=1} # NOTE: No SDL_TEXTEDITING here. When a user deletes all of the preedit text by repeatedly hitting Backspace key, since it doesn't insert any character, SDL_TEXTINPUT will not be sent. In this case, the last empty SDL_TEXTEDITING will be a only means of informing the application that the preedit process has ended. X11 backend should send it, as well as Windows backend.