From 4aaa265407f11f1b3c1174d73581e6fd00727d6e Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sun, 5 Nov 2017 21:02:22 +0100 Subject: [PATCH] Fix IBus Signed-off-by: Igor Gnatenko --- SDL2-2.0.7-fix-ibus.diff | 20 ++++++++++++++++++++ SDL2.spec | 10 ++++++++-- 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 SDL2-2.0.7-fix-ibus.diff diff --git a/SDL2-2.0.7-fix-ibus.diff b/SDL2-2.0.7-fix-ibus.diff new file mode 100644 index 0000000..91a5a58 --- /dev/null +++ b/SDL2-2.0.7-fix-ibus.diff @@ -0,0 +1,20 @@ +diff -Nur SDL2-2.0.7/src/core/linux/SDL_ibus.c SDL2-2.0.7n/src/core/linux/SDL_ibus.c +--- SDL2-2.0.7/src/core/linux/SDL_ibus.c 2017-10-24 03:27:46.000000000 +0800 ++++ SDL2-2.0.7n/src/core/linux/SDL_ibus.c 2017-10-26 18:32:46.795026798 +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); diff --git a/SDL2.spec b/SDL2.spec index 88f188e..3e554b2 100644 --- a/SDL2.spec +++ b/SDL2.spec @@ -1,7 +1,7 @@ Name: SDL2 Version: 2.0.7 -Release: 1%{?dist} -Summary: A cross-platform multimedia library +Release: 2%{?dist} +Summary: Cross-platform multimedia library License: zlib and MIT URL: http://www.libsdl.org/ @@ -9,6 +9,9 @@ Source0: http://www.libsdl.org/release/%{name}-%{version}.tar.gz Source1: SDL_config.h Patch0: multilib.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1507444 +# https://bugzilla.libsdl.org/show_bug.cgi?id=3920 +Patch1: SDL2-2.0.7-fix-ibus.diff BuildRequires: alsa-lib-devel BuildRequires: audiofile-devel @@ -125,6 +128,9 @@ rm -vf %{buildroot}%{_libdir}/*.la %{_libdir}/lib*.a %changelog +* Sun Nov 05 2017 Igor Gnatenko - 2.0.7-2 +- Fix IBus + * Tue Oct 24 2017 Igor Gnatenko - 2.0.7-1 - Update to 2.0.7