[Commits] SDL: Fixed bug 3920 - IBus not work with SDL 2.0.7

libsdl.org revision control commits-owner at libsdl.org
Tue Feb 13 08:15:41 PST 2018


details:   https://hg.libsdl.org/SDL/rev/b548450528c9
changeset: 11870:b548450528c9
user:      Sam Lantinga <slouken at libsdl.org>
date:      Tue Feb 13 08:15:39 2018 -0800
description:
Fixed bug 3920 - IBus not work with SDL 2.0.7

cjacker

After updating from 2.0.5 to 2.0.7, Ibus not work anymore(fcitx still works).

Compare with 2.0.5, there are two issues in SDL_ibus.c.

1, SetupConnection always return SDL_FALSE in 2.0.7.

2, 'SetCapabilities' method should be called on 'ibus_conn'.

Patch attached.

diffstat:

 src/core/linux/SDL_ibus.c |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (20 lines):

diff -r 68864895c386 -r b548450528c9 src/core/linux/SDL_ibus.c
--- a/src/core/linux/SDL_ibus.c	Tue Feb 13 08:13:29 2018 -0800
+++ b/src/core/linux/SDL_ibus.c	Tue Feb 13 08:15:39 2018 -0800
@@ -299,7 +299,7 @@
             caps |= IBUS_CAP_PREEDIT_TEXT;
         }
 
-        SDL_DBus_CallVoidMethod(IBUS_SERVICE, input_ctx_path, IBUS_INPUT_INTERFACE, "SetCapabilities",
+        SDL_DBus_CallVoidMethodOnConnection(ibus_conn, IBUS_SERVICE, input_ctx_path, IBUS_INPUT_INTERFACE, "SetCapabilities",
                                 DBUS_TYPE_UINT32, &caps, DBUS_TYPE_INVALID);
     }
 }
@@ -341,6 +341,7 @@
         dbus->bus_add_match(ibus_conn, "type='signal',interface='org.freedesktop.IBus.InputContext'", NULL);
         dbus->connection_try_register_object_path(ibus_conn, input_ctx_path, &ibus_vtable, dbus, NULL);
         dbus->connection_flush(ibus_conn);
+        result = SDL_TRUE;
     }
 
     SDL_IBus_SetFocus(SDL_GetKeyboardFocus() != NULL);


More information about the commits mailing list