Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

X11+IBus: SDL2 should post SDL_TEXTEDITING when preedit is cancelled by hitting Backspaces #1743

Closed
SDLBugzilla opened this issue Feb 10, 2021 · 1 comment
Labels
abandoned Bug has been abandoned for various reasons

Comments

@SDLBugzilla
Copy link
Collaborator

SDLBugzilla commented Feb 10, 2021

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: 2.0.3
Reported for operating system, platform: Linux, x86

Comments on the original bug report:

On 2015-01-14 11:00:14 +0000, Kengo Ide wrote:

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.

On 2015-02-01 21:17:27 +0000, Alex Baines wrote:

Created attachment 2012
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.

On 2015-02-19 06:32:14 +0000, Ryan C. Gordon wrote:

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!

On 2015-02-27 21:26:54 +0000, Alex Baines wrote:

Created attachment 2053
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.

On 2015-05-27 01:06:14 +0000, Ryan C. Gordon wrote:

(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.

On 2015-05-27 01:06:52 +0000, Ryan C. Gordon wrote:

(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.

On 2015-05-27 07:30:57 +0000, Kengo Ide wrote:

I verified that the bug is now fixed at r9652. Thank you.

On 2018-01-23 06:53:54 +0000, Gajo Petrovic wrote:

I have this exact same issue with fcitx in r11826. Reopening.

@slouken slouken removed the bug label May 11, 2022
@slouken slouken added the abandoned Bug has been abandoned for various reasons label Nov 4, 2023
@slouken
Copy link
Collaborator

slouken commented Nov 4, 2023

SDL 2.0 is now in maintenance mode, and all inactive issues are being closed. If this issue is impacting you, please feel free to reopen it with additional information.

@slouken slouken closed this as not planned Won't fix, can't repro, duplicate, stale Nov 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
abandoned Bug has been abandoned for various reasons
Projects
None yet
Development

No branches or pull requests

2 participants