Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
slouken committed Feb 13, 2018
1 parent 3b4c2fd commit f6366c0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/linux/SDL_ibus.c
Expand Up @@ -299,7 +299,7 @@ IBus_SetCapabilities(void *data, const char *name, const char *old_val,
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);
}
}
Expand Down Expand Up @@ -341,6 +341,7 @@ IBus_SetupConnection(SDL_DBusContext *dbus, const char* addr)
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);
Expand Down

0 comments on commit f6366c0

Please sign in to comment.