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

Add IBus IME support #1494

Closed
SDLBugzilla opened this issue Feb 10, 2021 · 0 comments
Closed

Add IBus IME support #1494

SDLBugzilla opened this issue Feb 10, 2021 · 0 comments
Labels
enhancement

Comments

@SDLBugzilla
Copy link
Collaborator

@SDLBugzilla 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: HG 2.0
Reported for operating system, platform: Linux, All

Comments on the original bug report:

On 2014-05-19 16:02:10 +0000, Alex Baines wrote:

Created attachment 1654
IBus Patch

This patch adds support for the IBus IME to SDL on X11/Linux platforms. It uses DBus directly to interact with IBus instead of linking with / loading all the glib related stuff that libibus needs.

The existing DBus code was also moved to its own file to better support this.

On 2014-05-20 00:19:15 +0000, Philipp Wiesemann wrote:

In SDL_dbus.c a plain memset() and in SDL_ibus.c a plain strdup() is used. I do not know if it matters here but in the other files it is SDL_memset() and SDL_strdup().

On 2014-05-20 16:23:31 +0000, Alex Baines wrote:

Created attachment 1657
IBus Patch v2

Thanks, I have updated the patch changing these functions to the proper SDL_ versions.

I also fixed a few other bugs:

  • removed some defines from SDL_config.h.in that were from an older patch and were no longer needed.
  • corrected the style of some pointer definitions from "type* name" to "type *name"
  • Added SDL_IBus_Reset and call it when text input is disabled to close and reset the candidate list (before it would just stick around forever if you disabled text input while it was open).

On 2014-05-22 21:37:20 +0000, Alex Baines wrote:

There are a few issues with the current patch that I've noticed, namely:

  • If it couldn't connect to IBus initially, it will try fopening() the ibus address file every time a key is pressed while the SDL_TEXTINPUT event is enabled. It should probably use inotify for this instead.

  • The SDL_TEXTEDITING events only have 32 bytes of room for editing text, but IBus has no such limit, I'm not sure how to handle the case where IBus is editing >32 bytes of text.

On 2014-06-16 01:34:41 +0000, Sam Lantinga wrote:

Can you fix this issue before we accept the patch?
"If it couldn't connect to IBus initially, it will try fopening() the ibus address file every time a key is pressed while the SDL_TEXTINPUT event is enabled. It should probably use inotify for this instead."

Thanks!

On 2014-06-16 19:15:38 +0000, Alex Baines wrote:

Created attachment 1683
IBus Patch v3

Ok, Here's an updated patch that uses inotify and sends multiple editing events in a row if IBus has >32 chars being edited.

On 2014-06-16 23:05:47 +0000, Alex Baines wrote:

Created attachment 1684
IBus Patch v3.1

Just made a small update to the latest patch to fix some formatting and remove a call to non-SDL strlen.

On 2014-06-18 17:04:21 +0000, Alex Baines wrote:

Created attachment 1686
IBus Patch v3.2

Here is another new version of the patch. It fixes a single-character typo in configure.in and adds a patch by Weitian Leung to stop key events being sent if they were handled by IBus.

On 2014-06-18 19:15:31 +0000, Alex Baines wrote:

Created attachment 1690
IBus Patch v3.3

Sorry, here's yet another version of the patch, hopefully the last. This corrects Key events not being sent when compiled with --disable-ibus.

On 2014-06-21 19:02:03 +0000, Sam Lantinga wrote:

Looks good, thanks!
https://hg.libsdl.org/SDL/rev/26a6243b27c2

Feel free to submit new bugs with any additional patches.

@SDLBugzilla SDLBugzilla added the enhancement label Feb 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement
Projects
None yet
Development

No branches or pull requests

1 participant