commit 1988382e5e8a14c7ce75888ca4348e7662adf73b Author: MSVSphere Packaging Team Date: Thu Mar 28 17:31:12 2024 +0300 import ibus-1.5.25-5.el9 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9286e13 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/ibus-1.5.25.tar.gz diff --git a/.ibus.metadata b/.ibus.metadata new file mode 100644 index 0000000..4fb4826 --- /dev/null +++ b/.ibus.metadata @@ -0,0 +1 @@ +4058f9b11781f9d33927c2464da6ebcaa5c2a83a SOURCES/ibus-1.5.25.tar.gz diff --git a/SOURCES/ibus-1385349-segv-bus-proxy.patch b/SOURCES/ibus-1385349-segv-bus-proxy.patch new file mode 100644 index 0000000..91ca4a7 --- /dev/null +++ b/SOURCES/ibus-1385349-segv-bus-proxy.patch @@ -0,0 +1,403 @@ +From 41c325dfb32269c9aadfeedb4df44656aac4d883 Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Fri, 20 Nov 2020 09:53:54 +0900 +Subject: [PATCH] Fix SEGV in bus_panel_proxy_focus_in() + +rhbz#1350291 SEGV in BUS_IS_CONNECTION(skip_connection) in +bus_dbus_impl_dispatch_message_by_rule() +check if dbus_connection is closed in bus_dbus_impl_connection_filter_cb(). + +rhbz#1767976 SEGV in assert(connection != NULL) in +bus_dbus_impl_connection_filter_cb() +call bus_connection_set_filter() in bus_dbus_impl_destroy(). + +rhbz#1601577 rhbz#1797726 SEGV in ibus_engine_desc_get_layout() in +bus_engine_proxy_new_internal() +WIP: Added a GError to get the error message to check why the SEGV happened. + +rhbz#1663528 SEGV in g_mutex_clear() in bus_dbus_impl_destroy() +If the mutex is not unlocked, g_mutex_clear() causes assert. + +rhbz#1767691 SEGV in client/x11/main.c:_sighandler(). +Do not call atexit functions in _sighandler(). + +rhbz#1795499 SEGV in ibus_bus_get_bus_address() because of no _bus->priv. +_changed_cb() should not be called after ibus_bus_destroy() is called. + +rhbz#1771238 SEGV in assert(m_loop == null) in switcher.vala. +Grabbing keyboard could be failed and switcher received the keyboard +events and m_loop was not released. + +rhbz#1797120 SEGV in assert(bus.is_connected()) in panel_binding_construct() +Check m_ibus in extension.vala:bus_name_acquired_cb() + +BUG=rhbz#1350291 +BUG=rhbz#1601577 +BUG=rhbz#1663528 +BUG=rhbz#1767691 +BUG=rhbz#1795499 +BUG=rhbz#1771238 +BUG=rhbz#1767976 +BUG=rhbz#1797120 +--- + bus/dbusimpl.c | 47 ++++++++++++++++++++++++--- + bus/engineproxy.c | 51 ++++++++++++++++++++++------- + client/x11/main.c | 8 ++++- + src/ibusbus.c | 5 +++ + ui/gtk3/extension.vala | 4 +++ + ui/gtk3/switcher.vala | 73 +++++++++++++++++++++++++----------------- + 6 files changed, 141 insertions(+), 47 deletions(-) + +diff --git a/bus/dbusimpl.c b/bus/dbusimpl.c +index 59787a80..af2fbde2 100644 +--- a/bus/dbusimpl.c ++++ b/bus/dbusimpl.c +@@ -610,6 +610,7 @@ static void + bus_dbus_impl_destroy (BusDBusImpl *dbus) + { + GList *p; ++ int i; + + for (p = dbus->objects; p != NULL; p = p->next) { + IBusService *object = (IBusService *) p->data; +@@ -633,6 +634,10 @@ bus_dbus_impl_destroy (BusDBusImpl *dbus) + + for (p = dbus->connections; p != NULL; p = p->next) { + BusConnection *connection = BUS_CONNECTION (p->data); ++ /* rhbz#1767976 Fix connection == NULL in ++ * bus_dbus_impl_connection_filter_cb() ++ */ ++ bus_connection_set_filter (connection, NULL, NULL, NULL); + g_signal_handlers_disconnect_by_func (connection, + bus_dbus_impl_connection_destroy_cb, dbus); + ibus_object_destroy (IBUS_OBJECT (connection)); +@@ -647,12 +652,39 @@ bus_dbus_impl_destroy (BusDBusImpl *dbus) + dbus->unique_names = NULL; + dbus->names = NULL; + ++ for (i = 0; g_idle_remove_by_data (dbus); i++) { ++ if (i > 1000) { ++ g_warning ("Too many idle threads were generated by " \ ++ "bus_dbus_impl_forward_message_idle_cb and " \ ++ "bus_dbus_impl_dispatch_message_by_rule_idle_cb"); ++ break; ++ } ++ } + g_list_free_full (dbus->start_service_calls, + (GDestroyNotify) bus_method_call_free); + dbus->start_service_calls = NULL; + +- g_mutex_clear (&dbus->dispatch_lock); +- g_mutex_clear (&dbus->forward_lock); ++ /* rhbz#1663528 Call g_mutex_trylock() before g_mutex_clear() ++ * because if the mutex is not unlocked, g_mutex_clear() causes assert. ++ */ ++#define BUS_DBUS_MUTEX_SAFE_CLEAR(mtex) { \ ++ int count = 0; \ ++ while (!g_mutex_trylock ((mtex))) { \ ++ g_usleep (1); \ ++ if (count > 60) { \ ++ g_warning (#mtex " is dead lock"); \ ++ break; \ ++ } \ ++ ++count; \ ++ } \ ++ g_mutex_unlock ((mtex)); \ ++ g_mutex_clear ((mtex)); \ ++} ++ ++ BUS_DBUS_MUTEX_SAFE_CLEAR (&dbus->dispatch_lock); ++ BUS_DBUS_MUTEX_SAFE_CLEAR (&dbus->forward_lock); ++ ++#undef BUS_DBUS_MUTEX_SAFE_CLEAR + + /* FIXME destruct _lock and _queue members. */ + IBUS_OBJECT_CLASS(bus_dbus_impl_parent_class)->destroy ((IBusObject *) dbus); +@@ -1483,13 +1515,20 @@ bus_dbus_impl_connection_filter_cb (GDBusConnection *dbus_connection, + gboolean incoming, + gpointer user_data) + { ++ BusDBusImpl *dbus; ++ BusConnection *connection; ++ + g_assert (G_IS_DBUS_CONNECTION (dbus_connection)); + g_assert (G_IS_DBUS_MESSAGE (message)); + g_assert (BUS_IS_DBUS_IMPL (user_data)); + +- BusDBusImpl *dbus = (BusDBusImpl *) user_data; +- BusConnection *connection = bus_connection_lookup (dbus_connection); ++ if (g_dbus_connection_is_closed (dbus_connection)) ++ return NULL; ++ ++ dbus = (BusDBusImpl *) user_data; ++ connection = bus_connection_lookup (dbus_connection); + g_assert (connection != NULL); ++ g_assert (BUS_IS_CONNECTION (connection)); + + if (incoming) { + /* is incoming message */ +diff --git a/bus/engineproxy.c b/bus/engineproxy.c +index 2d98995c..bbbe5532 100644 +--- a/bus/engineproxy.c ++++ b/bus/engineproxy.c +@@ -660,20 +660,33 @@ bus_engine_proxy_g_signal (GDBusProxy *proxy, + g_return_if_reached (); + } + ++#pragma GCC optimize ("O0") + static BusEngineProxy * + bus_engine_proxy_new_internal (const gchar *path, + IBusEngineDesc *desc, +- GDBusConnection *connection) ++ GDBusConnection *connection, ++ GError **error) + { ++ GDBusProxyFlags flags; ++ BusEngineProxy *engine; ++ + g_assert (path); + g_assert (IBUS_IS_ENGINE_DESC (desc)); + g_assert (G_IS_DBUS_CONNECTION (connection)); ++ g_assert (error && *error == NULL); + +- GDBusProxyFlags flags = G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START; +- BusEngineProxy *engine = ++ /* rhbz#1601577 engine == NULL if connection is closed. */ ++ if (g_dbus_connection_is_closed (connection)) { ++ *error = g_error_new (G_DBUS_ERROR, ++ G_DBUS_ERROR_FAILED, ++ "Connection is closed."); ++ return NULL; ++ } ++ flags = G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START; ++ engine = + (BusEngineProxy *) g_initable_new (BUS_TYPE_ENGINE_PROXY, + NULL, +- NULL, ++ error, + "desc", desc, + "g-connection", connection, + "g-interface-name", IBUS_INTERFACE_ENGINE, +@@ -681,12 +694,19 @@ bus_engine_proxy_new_internal (const gchar *path, + "g-default-timeout", g_gdbus_timeout, + "g-flags", flags, + NULL); ++ /* FIXME: rhbz#1601577 */ ++ if (!engine) { ++ /* show abrt local variable */ ++ gchar *message = g_strdup ((*error)->message); ++ g_error ("%s", message); ++ } + const gchar *layout = ibus_engine_desc_get_layout (desc); + if (layout != NULL && layout[0] != '\0') { + engine->keymap = ibus_keymap_get (layout); + } + return engine; + } ++#pragma GCC reset_options + + typedef struct { + GTask *task; +@@ -748,23 +768,30 @@ create_engine_ready_cb (BusFactoryProxy *factory, + GAsyncResult *res, + EngineProxyNewData *data) + { ++ GError *error = NULL; ++ gchar *path; ++ BusEngineProxy *engine; ++ + g_return_if_fail (data->task != NULL); + +- GError *error = NULL; +- gchar *path = bus_factory_proxy_create_engine_finish (factory, +- res, +- &error); ++ path = bus_factory_proxy_create_engine_finish (factory, res, &error); + if (path == NULL) { + g_task_return_error (data->task, error); + engine_proxy_new_data_free (data); + return; + } + +- BusEngineProxy *engine = +- bus_engine_proxy_new_internal (path, +- data->desc, +- g_dbus_proxy_get_connection ((GDBusProxy *)data->factory)); ++ engine = bus_engine_proxy_new_internal ( ++ path, ++ data->desc, ++ g_dbus_proxy_get_connection ((GDBusProxy *)data->factory), ++ &error); + g_free (path); ++ if (!engine) { ++ g_task_return_error (data->task, error); ++ engine_proxy_new_data_free (data); ++ return; ++ } + + /* FIXME: set destroy callback ? */ + g_task_return_pointer (data->task, engine, NULL); +diff --git a/client/x11/main.c b/client/x11/main.c +index c9ee174d..768b91f0 100644 +--- a/client/x11/main.c ++++ b/client/x11/main.c +@@ -40,6 +40,7 @@ + #include + #include + #include ++#include + + #include + +@@ -1104,7 +1105,12 @@ _atexit_cb () + static void + _sighandler (int sig) + { +- exit(EXIT_FAILURE); ++ /* rhbz#1767691 _sighandler() is called with SIGTERM ++ * and exit() causes SEGV during calling atexit functions. ++ * _atexit_cb() might be broken. _exit() does not call ++ * atexit functions. ++ */ ++ _exit(EXIT_FAILURE); + } + + static void +diff --git a/src/ibusbus.c b/src/ibusbus.c +index b7ffbb47..668c8a26 100644 +--- a/src/ibusbus.c ++++ b/src/ibusbus.c +@@ -689,6 +689,11 @@ ibus_bus_destroy (IBusObject *object) + _bus = NULL; + + if (bus->priv->monitor) { ++ /* rhbz#1795499 _changed_cb() causes SEGV because of no bus->priv ++ * after ibus_bus_destroy() is called. ++ */ ++ g_signal_handlers_disconnect_by_func (bus->priv->monitor, ++ (GCallback) _changed_cb, bus); + g_object_unref (bus->priv->monitor); + bus->priv->monitor = NULL; + } +diff --git a/ui/gtk3/extension.vala b/ui/gtk3/extension.vala +index a6f2e8e6..b7a04081 100644 +--- a/ui/gtk3/extension.vala ++++ b/ui/gtk3/extension.vala +@@ -73,6 +73,10 @@ class ExtensionGtk : Gtk.Application { + string signal_name, + Variant parameters) { + debug("signal_name = %s", signal_name); ++ /* rhbz#1797120 Fix assert(bus.is_connected()) in ++ * panel_binding_construct() ++ */ ++ return_if_fail(m_bus.is_connected()); + m_panel = new PanelBinding(m_bus, this); + m_panel.load_settings(); + } +diff --git a/ui/gtk3/switcher.vala b/ui/gtk3/switcher.vala +index a4529c88..29a70dd5 100644 +--- a/ui/gtk3/switcher.vala ++++ b/ui/gtk3/switcher.vala +@@ -140,8 +140,8 @@ class Switcher : Gtk.Window { + IBus.EngineDesc[] engines, + int index, + string input_context_path) { +- assert (m_loop == null); +- assert (index < engines.length); ++ assert(m_loop == null); ++ assert(index < engines.length); + + m_is_running = true; + m_keyval = keyval; +@@ -198,16 +198,18 @@ class Switcher : Gtk.Window { + null, + event, + null); +- if (status != Gdk.GrabStatus.SUCCESS) ++ if (status != Gdk.GrabStatus.SUCCESS) { + warning("Grab keyboard failed! status = %d", status); +- status = seat.grab(get_window(), +- Gdk.SeatCapabilities.POINTER, +- true, +- null, +- event, +- null); +- if (status != Gdk.GrabStatus.SUCCESS) +- warning("Grab pointer failed! status = %d", status); ++ } else { ++ status = seat.grab(get_window(), ++ Gdk.SeatCapabilities.POINTER, ++ true, ++ null, ++ event, ++ null); ++ if (status != Gdk.GrabStatus.SUCCESS) ++ warning("Grab pointer failed! status = %d", status); ++ } + #else + Gdk.Device device = event.get_device(); + if (device == null) { +@@ -243,30 +245,41 @@ class Switcher : Gtk.Window { + Gdk.EventMask.KEY_RELEASE_MASK, + null, + Gdk.CURRENT_TIME); +- if (status != Gdk.GrabStatus.SUCCESS) ++ if (status != Gdk.GrabStatus.SUCCESS) { + warning("Grab keyboard failed! status = %d", status); +- // Grab all pointer events +- status = pointer.grab(get_window(), +- Gdk.GrabOwnership.NONE, +- true, +- Gdk.EventMask.BUTTON_PRESS_MASK | +- Gdk.EventMask.BUTTON_RELEASE_MASK, +- null, +- Gdk.CURRENT_TIME); +- if (status != Gdk.GrabStatus.SUCCESS) +- warning("Grab pointer failed! status = %d", status); ++ } else { ++ // Grab all pointer events ++ status = pointer.grab(get_window(), ++ Gdk.GrabOwnership.NONE, ++ true, ++ Gdk.EventMask.BUTTON_PRESS_MASK | ++ Gdk.EventMask.BUTTON_RELEASE_MASK, ++ null, ++ Gdk.CURRENT_TIME); ++ if (status != Gdk.GrabStatus.SUCCESS) ++ warning("Grab pointer failed! status = %d", status); ++ } + #endif + +- // Probably we can delete m_popup_delay_time in 1.6 +- pointer.get_position_double(null, +- out m_mouse_init_x, +- out m_mouse_init_y); +- m_mouse_moved = false; ++ /* Fix RHBZ #1771238 assert(m_loop == null) ++ * Grabbing keyboard can be failed when the second Super-e is typed ++ * before Switcher dialog is focused. And m_loop could not be released ++ * if the failed Super-e would call m_loop.run() below and could not ++ * call key_release_event(). And m_loop == null would be false in the ++ * third Super-e. ++ */ ++ if (status == Gdk.GrabStatus.SUCCESS) { ++ // Probably we can delete m_popup_delay_time in 1.6 ++ pointer.get_position_double(null, ++ out m_mouse_init_x, ++ out m_mouse_init_y); ++ m_mouse_moved = false; + + +- m_loop = new GLib.MainLoop(); +- m_loop.run(); +- m_loop = null; ++ m_loop = new GLib.MainLoop(); ++ m_loop.run(); ++ m_loop = null; ++ } + + #if VALA_0_34 + seat.ungrab(); +-- +2.24.1 + diff --git a/SOURCES/ibus-1616-gtk4-sync.patch b/SOURCES/ibus-1616-gtk4-sync.patch new file mode 100644 index 0000000..ebead81 --- /dev/null +++ b/SOURCES/ibus-1616-gtk4-sync.patch @@ -0,0 +1,3286 @@ +From 5cfe838715097d61b50da55f80bcff2c698ca885 Mon Sep 17 00:00:00 2001 +From: Changwoo Ryu +Date: Fri, 18 Feb 2022 09:07:02 +0900 +Subject: [PATCH] client/gtk2/ibusimcontext: Fix forward key keycode for GTK4 + +When a keycode is provided (!= 0) for a forwarded key event, convert it to a +GTK keycode before passing it to gtk_im_context_filter_key(). + +Also free GdkKeymapKey after gdk_display_map_keyval() is called. + +BUG=https://github.com/ibus/ibus/issues/2380 +BUG=https://github.com/ibus/ibus/issues/2382 +--- + client/gtk2/ibusimcontext.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/client/gtk2/ibusimcontext.c b/client/gtk2/ibusimcontext.c +index c2df3a87..a5e5e792 100644 +--- a/client/gtk2/ibusimcontext.c ++++ b/client/gtk2/ibusimcontext.c +@@ -1945,7 +1945,9 @@ _ibus_context_forward_key_event_cb (IBusInputContext *ibuscontext, + #if GTK_CHECK_VERSION (3, 98, 4) + int group = 0; + g_return_if_fail (GTK_IS_IM_CONTEXT (ibusimcontext)); +- if (keycode == 0 && ibusimcontext->client_window) { ++ if (keycode != 0) { ++ keycode += 8; // to GTK keycode ++ } else if (ibusimcontext->client_window) { + GdkDisplay *display = + gtk_widget_get_display (ibusimcontext->client_window); + GdkKeymapKey *keys = NULL; +@@ -1953,6 +1955,7 @@ _ibus_context_forward_key_event_cb (IBusInputContext *ibuscontext, + if (gdk_display_map_keyval (display, keyval, &keys, &n_keys)) { + keycode = keys->keycode; + group = keys->group; ++ g_free (keys); + } else { + g_warning ("Failed to parse keycode from keyval %x", keyval); + } +-- +2.37.3 + +From 8711dc83225a7fade3ba67ab796ecb03b38406ff Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Fri, 20 May 2022 20:54:58 +0900 +Subject: [PATCH] client/gtk2/ibusimcontext: keycode - 8 for gtk3 keycode + generation + +Since IBus keycode subtracts 8 from Linux keycode, keycodes from +gdk_keymap_get_entries_for_keyval() also have to be subtracted 8. +The keycodes will add 8 when they bring back the GDK event loop. +--- + client/gtk2/ibusimcontext.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/client/gtk2/ibusimcontext.c b/client/gtk2/ibusimcontext.c +index a5e5e792..07835a24 100644 +--- a/client/gtk2/ibusimcontext.c ++++ b/client/gtk2/ibusimcontext.c +@@ -2,8 +2,8 @@ + /* vim:set et sts=4: */ + /* ibus - The Input Bus + * Copyright (C) 2008-2013 Peng Huang +- * Copyright (C) 2015-2021 Takao Fujiwara +- * Copyright (C) 2008-2021 Red Hat, Inc. ++ * Copyright (C) 2015-2022 Takao Fujiwara ++ * Copyright (C) 2008-2022 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public +@@ -1980,6 +1980,9 @@ _ibus_context_forward_key_event_cb (IBusInputContext *ibuscontext, + keycode = keys->keycode; + else + g_warning ("Failed to parse keycode from keyval %x", keyval); ++ /* _create_gdk_event() will add 8 to keycode. */ ++ if (keycode != 0) ++ keycode -= 8; + } + GdkEventKey *event = _create_gdk_event (ibusimcontext, keyval, keycode, state); + gdk_event_put ((GdkEvent *)event); +-- +2.37.3 + +From 3e5fab4991f4e2e22b56cf57d4dfb779a1d1977c Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Fri, 20 May 2022 20:54:59 +0900 +Subject: [PATCH] client/gtk2: Revert CCedilla change for pt-BR + +gtk_im_context_simple_add_table() is deprecated in GTK4. +I decide to delete gtk_im_context_simple_add_table() here because +the change 03c9e591430c62354bbf26ef7bd4a2e6acfb7c8f is no longer needed +because IBusEngineSimple has implemented to load pt_br compose key +by locale. + +Fixes: 03c9e591430c62354bbf26ef7bd4a2e6acfb7c8f + +BUG=chromium-os:11421 +BUG=http://codereview.appspot.com/3989060 +--- + client/gtk2/ibusimcontext.c | 31 ------------------------------- + 1 file changed, 31 deletions(-) + +diff --git a/client/gtk2/ibusimcontext.c b/client/gtk2/ibusimcontext.c +index 07835a24..c7f23293 100644 +--- a/client/gtk2/ibusimcontext.c ++++ b/client/gtk2/ibusimcontext.c +@@ -874,33 +874,6 @@ ibus_im_context_class_fini (IBusIMContextClass *class) + g_bus_unwatch_name (_daemon_name_watch_id); + } + +-/* Copied from gtk+2.0-2.20.1/modules/input/imcedilla.c to fix crosbug.com/11421. +- * Overwrite the original Gtk+'s compose table in gtk+-2.x.y/gtk/gtkimcontextsimple.c. */ +- +-/* The difference between this and the default input method is the handling +- * of C+acute - this method produces C WITH CEDILLA rather than C WITH ACUTE. +- * For languages that use CCedilla and not acute, this is the preferred mapping, +- * and is particularly important for pt_BR, where the us-intl keyboard is +- * used extensively. +- */ +-static guint16 cedilla_compose_seqs[] = { +-#ifdef DEPRECATED_GDK_KEYSYMS +- GDK_dead_acute, GDK_C, 0, 0, 0, 0x00C7, /* LATIN_CAPITAL_LETTER_C_WITH_CEDILLA */ +- GDK_dead_acute, GDK_c, 0, 0, 0, 0x00E7, /* LATIN_SMALL_LETTER_C_WITH_CEDILLA */ +- GDK_Multi_key, GDK_apostrophe, GDK_C, 0, 0, 0x00C7, /* LATIN_CAPITAL_LETTER_C_WITH_CEDILLA */ +- GDK_Multi_key, GDK_apostrophe, GDK_c, 0, 0, 0x00E7, /* LATIN_SMALL_LETTER_C_WITH_CEDILLA */ +- GDK_Multi_key, GDK_C, GDK_apostrophe, 0, 0, 0x00C7, /* LATIN_CAPITAL_LETTER_C_WITH_CEDILLA */ +- GDK_Multi_key, GDK_c, GDK_apostrophe, 0, 0, 0x00E7, /* LATIN_SMALL_LETTER_C_WITH_CEDILLA */ +-#else +- GDK_KEY_dead_acute, GDK_KEY_C, 0, 0, 0, 0x00C7, /* LATIN_CAPITAL_LETTER_C_WITH_CEDILLA */ +- GDK_KEY_dead_acute, GDK_KEY_c, 0, 0, 0, 0x00E7, /* LATIN_SMALL_LETTER_C_WITH_CEDILLA */ +- GDK_KEY_Multi_key, GDK_KEY_apostrophe, GDK_KEY_C, 0, 0, 0x00C7, /* LATIN_CAPITAL_LETTER_C_WITH_CEDILLA */ +- GDK_KEY_Multi_key, GDK_KEY_apostrophe, GDK_KEY_c, 0, 0, 0x00E7, /* LATIN_SMALL_LETTER_C_WITH_CEDILLA */ +- GDK_KEY_Multi_key, GDK_KEY_C, GDK_KEY_apostrophe, 0, 0, 0x00C7, /* LATIN_CAPITAL_LETTER_C_WITH_CEDILLA */ +- GDK_KEY_Multi_key, GDK_KEY_c, GDK_KEY_apostrophe, 0, 0, 0x00E7, /* LATIN_SMALL_LETTER_C_WITH_CEDILLA */ +-#endif +-}; +- + static void + ibus_im_context_init (GObject *obj) + { +@@ -936,10 +909,6 @@ ibus_im_context_init (GObject *obj) + + // Create slave im context + ibusimcontext->slave = gtk_im_context_simple_new (); +- gtk_im_context_simple_add_table (GTK_IM_CONTEXT_SIMPLE (ibusimcontext->slave), +- cedilla_compose_seqs, +- 4, +- G_N_ELEMENTS (cedilla_compose_seqs) / (4 + 2)); + + g_signal_connect (ibusimcontext->slave, + "commit", +-- +2.37.3 + +From b94f0c1cea5d0e423fef3bcc13b23f212f04c930 Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Thu, 7 Jul 2022 08:13:57 +0900 +Subject: [PATCH] src: Add IBUS_CAP_OSK to IBusCapabilite + +Some IMEs' behavior is different between the on-screen keyboard and +the direct physical keyboard and this flag is useful for the IMEs. + +Also fix src/ibusaccelgroup.c for gtkdoc-mkhtml. +If the API comment of IBusCapabilite is updated, XML & HTML files +are rebuilt and gtk-doc-1.33.2 no longer accepts HTML tags in +the comments. + +diff --git a/src/ibusaccelgroup.c b/src/ibusaccelgroup.c +index ef2d3976..aec1c7e4 100644 +--- a/src/ibusaccelgroup.c ++++ b/src/ibusaccelgroup.c +@@ -267,14 +267,14 @@ is_keycode (const gchar *string) + * modifier mask, %NULL + * + * Parses a string representing an accelerator. The format looks like +- * “a” or “F1” or “z” (the last one is +- * for key release). ++ * “<Control>a” or “<Shift><Alt>F1” or “<Release%gt;z” ++ * (the last one is for key release). + * + * The parser is fairly liberal and allows lower or upper case, and also +- * abbreviations such as “” and “”. Key names are parsed using +- * gdk_keyval_from_name(). For character keys the name is not the symbol, +- * but the lowercase name, e.g. one would use “minus” instead of +- * “-”. ++ * abbreviations such as “<Ctl>” and “<Ctrl>”. Key names are ++ * parsed using gdk_keyval_from_name(). For character keys the name is not the ++ * symbol, but the lowercase name, e.g. one would use “<Ctrl>minus” ++ * instead of “<Ctrl>-”. + * + * If the parse fails, @accelerator_key and @accelerator_mods will + * be set to 0 (zero). +@@ -403,7 +403,7 @@ out: + * + * Converts an accelerator keyval and modifier mask into a string + * parseable by gtk_accelerator_parse(). For example, if you pass in +- * #IBUS_KEY_q and #IBUS_CONTROL_MASK, this function returns “q”. ++ * #IBUS_KEY_q and #IBUS_CONTROL_MASK, this function returns “<Control>q”. + * + * If you need to display accelerators in the user interface, + * see gtk_accelerator_get_label(). +diff --git a/src/ibustypes.h b/src/ibustypes.h +index 990659ac..60bcb92b 100644 +--- a/src/ibustypes.h ++++ b/src/ibustypes.h +@@ -108,6 +108,7 @@ typedef enum + * @IBUS_CAP_PROPERTY: UI is capable to have property. + * @IBUS_CAP_SURROUNDING_TEXT: Client can provide surround text, + * or IME can handle surround text. ++ * @IBUS_CAP_OSK: UI is owned by on-screen keyboard. + * + * Capability flags of UI. + */ +@@ -118,6 +119,7 @@ typedef enum { + IBUS_CAP_FOCUS = 1 << 3, + IBUS_CAP_PROPERTY = 1 << 4, + IBUS_CAP_SURROUNDING_TEXT = 1 << 5, ++ IBUS_CAP_OSK = 1 << 6, + } IBusCapabilite; + + /** +-- +2.37.3 + +From c957c5f6ba07074a8fb56c978c27873c1cfe0783 Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Tue, 19 Jul 2022 22:58:24 +0900 +Subject: [PATCH] client/gtk2: Implement new process_key_event for GTK4 + + +diff --git a/client/gtk2/ibusimcontext.c b/client/gtk2/ibusimcontext.c +index c7f23293..bc14df00 100644 +--- a/client/gtk2/ibusimcontext.c ++++ b/client/gtk2/ibusimcontext.c +@@ -111,13 +111,13 @@ static guint _signal_delete_surrounding_id = 0; + static guint _signal_retrieve_surrounding_id = 0; + + #if GTK_CHECK_VERSION (3, 98, 4) +-static gboolean _use_sync_mode = TRUE; ++static char _use_sync_mode = 2; + #else + static const gchar *_no_snooper_apps = NO_SNOOPER_APPS; + static gboolean _use_key_snooper = ENABLE_SNOOPER; + static guint _key_snooper_id = 0; + +-static gboolean _use_sync_mode = FALSE; ++static char _use_sync_mode = 0; + #endif + + static const gchar *_discard_password_apps = ""; +@@ -375,12 +375,15 @@ ibus_im_context_commit_event (IBusIMContext *ibusimcontext, + return FALSE; + } + +-struct _ProcessKeyEventData { ++typedef struct { + GdkEvent *event; + IBusIMContext *ibusimcontext; +-}; ++} ProcessKeyEventData; + +-typedef struct _ProcessKeyEventData ProcessKeyEventData; ++typedef struct { ++ GMainLoop *loop; ++ gboolean retval; ++} ProcessKeyEventReplyData; + + static void + _process_key_event_done (GObject *object, +@@ -395,12 +398,12 @@ _process_key_event_done (GObject *object, + IBusIMContext *ibusimcontext = data->ibusimcontext; + #endif + GError *error = NULL; ++ gboolean retval; + + g_slice_free (ProcessKeyEventData, data); +- gboolean retval = ibus_input_context_process_key_event_async_finish ( +- context, +- res, +- &error); ++ retval = ibus_input_context_process_key_event_async_finish (context, ++ res, ++ &error); + + if (error != NULL) { + g_warning ("Process Key Event failed: %s.", error->message); +@@ -431,6 +434,27 @@ _process_key_event_done (GObject *object, + #endif + } + ++static void ++_process_key_event_reply_done (GObject *object, ++ GAsyncResult *res, ++ gpointer user_data) ++{ ++ IBusInputContext *context = (IBusInputContext *)object; ++ ProcessKeyEventReplyData *data = (ProcessKeyEventReplyData *)user_data; ++ GError *error = NULL; ++ gboolean retval = ibus_input_context_process_key_event_async_finish ( ++ context, ++ res, ++ &error); ++ if (error != NULL) { ++ g_warning ("Process Key Event failed: %s.", error->message); ++ g_error_free (error); ++ } ++ g_return_if_fail (data); ++ data->retval = retval; ++ g_main_loop_quit (data->loop); ++} ++ + static gboolean + _process_key_event (IBusInputContext *context, + #if GTK_CHECK_VERSION (3, 98, 4) +@@ -462,13 +486,45 @@ _process_key_event (IBusInputContext *context, + #endif + keycode = hardware_keycode; + +- if (_use_sync_mode) { ++ switch (_use_sync_mode) { ++ case 1: { + retval = ibus_input_context_process_key_event (context, ++ keyval, ++ keycode - 8, ++ state); ++ break; ++ } ++ case 2: { ++ GMainLoop *loop = g_main_loop_new (NULL, TRUE); ++ ProcessKeyEventReplyData *data = NULL; ++ ++ if (loop) ++ data = g_slice_new0 (ProcessKeyEventReplyData); ++ if (!data) { ++ g_warning ("Cannot wait for the reply of the process key event."); ++ retval = ibus_input_context_process_key_event (context, ++ keyval, ++ keycode - 8, ++ state); ++ if (loop) ++ g_main_loop_quit (loop); ++ break; ++ } ++ data->loop = loop; ++ ibus_input_context_process_key_event_async (context, + keyval, + keycode - 8, +- state); ++ state, ++ -1, ++ NULL, ++ _process_key_event_reply_done, ++ data); ++ g_main_loop_run (loop); ++ retval = data->retval; ++ g_slice_free (ProcessKeyEventReplyData, data); ++ break; + } +- else { ++ default: { + ProcessKeyEventData *data = g_slice_new0 (ProcessKeyEventData); + #if GTK_CHECK_VERSION (3, 98, 4) + data->event = gdk_event_ref (event); +@@ -487,6 +543,7 @@ _process_key_event (IBusInputContext *context, + + retval = TRUE; + } ++ } + + /* GTK4 does not provide gtk_key_snooper_install() and also + * GtkIMContextClass->filter_keypress() cannot send the updated +@@ -676,24 +733,47 @@ _key_snooper_cb (GtkWidget *widget, + #endif + + static gboolean +-_get_boolean_env(const gchar *name, +- gboolean defval) ++_get_boolean_env (const gchar *name, ++ gboolean defval) + { + const gchar *value = g_getenv (name); + + if (value == NULL) +- return defval; ++ return defval; + + if (g_strcmp0 (value, "") == 0 || + g_strcmp0 (value, "0") == 0 || + g_strcmp0 (value, "false") == 0 || + g_strcmp0 (value, "False") == 0 || +- g_strcmp0 (value, "FALSE") == 0) +- return FALSE; ++ g_strcmp0 (value, "FALSE") == 0) { ++ return FALSE; ++ } + + return TRUE; + } + ++static char ++_get_char_env (const gchar *name, ++ char defval) ++{ ++ const gchar *value = g_getenv (name); ++ ++ if (value == NULL) ++ return defval; ++ ++ if (g_strcmp0 (value, "") == 0 || ++ g_strcmp0 (value, "0") == 0 || ++ g_strcmp0 (value, "false") == 0 || ++ g_strcmp0 (value, "False") == 0 || ++ g_strcmp0 (value, "FALSE") == 0) { ++ return 0; ++ } else if (!g_strcmp0 (value, "2")) { ++ return 2; ++ } ++ ++ return 1; ++} ++ + static void + daemon_name_appeared (GDBusConnection *connection, + const gchar *name, +@@ -777,11 +857,11 @@ ibus_im_context_class_init (IBusIMContextClass *class) + g_assert (_signal_retrieve_surrounding_id != 0); + + #if GTK_CHECK_VERSION (3, 98, 4) +- _use_sync_mode = _get_boolean_env ("IBUS_ENABLE_SYNC_MODE", TRUE); ++ _use_sync_mode = _get_char_env ("IBUS_ENABLE_SYNC_MODE", 2); + #else + _use_key_snooper = !_get_boolean_env ("IBUS_DISABLE_SNOOPER", + !(ENABLE_SNOOPER)); +- _use_sync_mode = _get_boolean_env ("IBUS_ENABLE_SYNC_MODE", FALSE); ++ _use_sync_mode = (char)_get_char_env ("IBUS_ENABLE_SYNC_MODE", 0); + #endif + _use_discard_password = _get_boolean_env ("IBUS_DISCARD_PASSWORD", FALSE); + +@@ -904,6 +984,8 @@ ibus_im_context_init (GObject *obj) + #else + ibusimcontext->caps = IBUS_CAP_PREEDIT_TEXT | IBUS_CAP_FOCUS; + #endif ++ if (_use_sync_mode != 1) ++ ibusimcontext->caps |= IBUS_CAP_SYNC_PROCESS_KEY; + + ibusimcontext->events_queue = g_queue_new (); + +@@ -1246,7 +1328,7 @@ ibus_im_context_reset (GtkIMContext *context) + * IBus uses button-press-event instead until GTK is fixed. + * https://gitlab.gnome.org/GNOME/gtk/issues/1534 + */ +- if (_use_sync_mode) ++ if (_use_sync_mode == 1) + ibus_im_context_clear_preedit_text (ibusimcontext); + ibus_input_context_reset (ibusimcontext->ibuscontext); + } +@@ -1361,7 +1443,7 @@ ibus_im_context_set_client_window (GtkIMContext *context, + + if (ibusimcontext->client_window) { + #if !GTK_CHECK_VERSION (3, 98, 4) +- if (ibusimcontext->use_button_press_event && !_use_sync_mode) ++ if (ibusimcontext->use_button_press_event && _use_sync_mode != 1) + _connect_button_press_event (ibusimcontext, FALSE); + #endif + g_object_unref (ibusimcontext->client_window); +@@ -1371,7 +1453,7 @@ ibus_im_context_set_client_window (GtkIMContext *context, + if (client != NULL) { + ibusimcontext->client_window = g_object_ref (client); + #if !GTK_CHECK_VERSION (3, 98, 4) +- if (!ibusimcontext->use_button_press_event && !_use_sync_mode) ++ if (!ibusimcontext->use_button_press_event && _use_sync_mode != 1) + _connect_button_press_event (ibusimcontext, TRUE); + #endif + } +@@ -1993,7 +2075,7 @@ _ibus_context_update_preedit_text_cb (IBusInputContext *ibuscontext, + #if !GTK_CHECK_VERSION (3, 98, 4) + if (!ibusimcontext->use_button_press_event && + mode == IBUS_ENGINE_PREEDIT_COMMIT && +- !_use_sync_mode) { ++ _use_sync_mode != 1) { + if (ibusimcontext->client_window) { + _connect_button_press_event (ibusimcontext, TRUE); + } +@@ -2200,6 +2282,8 @@ _create_input_context_done (IBusBus *bus, + static void + _create_input_context (IBusIMContext *ibusimcontext) + { ++ gchar *prgname = g_strdup (g_get_prgname()); ++ gchar *client_name; + IDEBUG ("%s", __FUNCTION__); + + g_assert (ibusimcontext->ibuscontext == NULL); +@@ -2208,11 +2292,24 @@ _create_input_context (IBusIMContext *ibusimcontext) + + ibusimcontext->cancellable = g_cancellable_new (); + ++ if (!prgname) ++ prgname = g_strdup_printf ("(%d)", getpid ()); ++ client_name = g_strdup_printf ("%s:%s", ++#if GTK_CHECK_VERSION (3, 98, 4) ++ "gtk4-im", ++#elif GTK_CHECK_VERSION (2, 91, 0) ++ "gtk3-im", ++#else ++ "gtk-im", ++#endif ++ prgname); ++ g_free (prgname); + ibus_bus_create_input_context_async (_bus, +- "gtk-im", -1, ++ client_name, -1, + ibusimcontext->cancellable, + (GAsyncReadyCallback)_create_input_context_done, + g_object_ref (ibusimcontext)); ++ g_free (client_name); + } + + /* Callback functions for slave context */ +@@ -2329,6 +2426,8 @@ _create_fake_input_context_done (IBusBus *bus, + NULL); + + guint32 caps = IBUS_CAP_PREEDIT_TEXT | IBUS_CAP_FOCUS | IBUS_CAP_SURROUNDING_TEXT; ++ if (_use_sync_mode != 1) ++ caps |= IBUS_CAP_SYNC_PROCESS_KEY; + ibus_input_context_set_capabilities (_fake_context, caps); + + /* focus in/out the fake context */ +diff --git a/src/ibustypes.h b/src/ibustypes.h +index 60bcb92b..a8eee319 100644 +--- a/src/ibustypes.h ++++ b/src/ibustypes.h +@@ -109,6 +109,9 @@ typedef enum + * @IBUS_CAP_SURROUNDING_TEXT: Client can provide surround text, + * or IME can handle surround text. + * @IBUS_CAP_OSK: UI is owned by on-screen keyboard. ++ * @IBUS_CAP_SYNC_PROCESS_KEY: Asynchronous process key events are not ++ * supported and the ibus_engine_forward_key_event() should not be ++ * used for the return value of #IBusEngine::process_key_event(). + * + * Capability flags of UI. + */ +@@ -120,6 +123,7 @@ typedef enum { + IBUS_CAP_PROPERTY = 1 << 4, + IBUS_CAP_SURROUNDING_TEXT = 1 << 5, + IBUS_CAP_OSK = 1 << 6, ++ IBUS_CAP_SYNC_PROCESS_KEY = 1 << 7, + } IBusCapabilite; + + /** +-- +2.41.0 + +From 506ac9993d5166196b7c4e9bfa9fb0f9d3792ffa Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Thu, 10 Nov 2022 18:38:05 +0900 +Subject: [PATCH] client/x11: Implement new process_key_event for ibus-x11 + +The new process_key_event is ported from GTK4 to X11 because +hangul maintainers wish to delete forward_key_event as much as possible +and currently we could apply forward_key_event to the sync mode only +and the new process_key_event is a new async key event process in X11 +and hangul might disable forward_key_event by default. + +Now the definition of IBUS_CAP_SYNC_PROCESS_KEY_V2 capability is changed +to set only if the sync mode. + +Also switch a heavy GMainLoop to the light GSource. + +Fixes: https://github.com/ibus/ibus/commit/c957c5f +--- + client/gtk2/ibusimcontext.c | 61 ++++++++++---- + client/x11/main.c | 157 +++++++++++++++++++++++++++++++----- + src/ibustypes.h | 1 + + 3 files changed, 184 insertions(+), 35 deletions(-) + +diff --git a/client/gtk2/ibusimcontext.c b/client/gtk2/ibusimcontext.c +index 6e338157..1f3723e6 100644 +--- a/client/gtk2/ibusimcontext.c ++++ b/client/gtk2/ibusimcontext.c +@@ -382,8 +382,9 @@ typedef struct { + } ProcessKeyEventData; + + typedef struct { +- GMainLoop *loop; +- gboolean retval; ++ int count; ++ guint count_cb_id; ++ gboolean retval; + } ProcessKeyEventReplyData; + + static void +@@ -453,7 +454,23 @@ _process_key_event_reply_done (GObject *object, + } + g_return_if_fail (data); + data->retval = retval; +- g_main_loop_quit (data->loop); ++ data->count = 0; ++ g_source_remove (data->count_cb_id); ++} ++ ++static gboolean ++_process_key_event_count_cb (gpointer user_data) ++{ ++ ProcessKeyEventReplyData *data = (ProcessKeyEventReplyData *)user_data; ++ g_return_val_if_fail (data, G_SOURCE_REMOVE); ++ if (!data->count) ++ return G_SOURCE_REMOVE; ++ /* Wait for about 10 secs. */ ++ if (data->count++ == 10000) { ++ data->count = 0; ++ return G_SOURCE_REMOVE; ++ } ++ return G_SOURCE_CONTINUE; + } + + static gboolean +@@ -496,10 +513,10 @@ _process_key_event (IBusInputContext *context, + break; + } + case 2: { +- GMainLoop *loop = g_main_loop_new (NULL, TRUE); ++ GSource *source = g_timeout_source_new (1); + ProcessKeyEventReplyData *data = NULL; + +- if (loop) ++ if (source) + data = g_slice_new0 (ProcessKeyEventReplyData); + if (!data) { + g_warning ("Cannot wait for the reply of the process key event."); +@@ -507,11 +524,14 @@ _process_key_event (IBusInputContext *context, + keyval, + keycode - 8, + state); +- if (loop) +- g_main_loop_quit (loop); ++ if (source) ++ g_source_destroy (source); + break; + } +- data->loop = loop; ++ data->count = 1; ++ g_source_attach (source, NULL); ++ g_source_unref (source); ++ data->count_cb_id = g_source_get_id (source); + ibus_input_context_process_key_event_async (context, + keyval, + keycode - 8, +@@ -520,7 +540,14 @@ _process_key_event (IBusInputContext *context, + NULL, + _process_key_event_reply_done, + data); +- g_main_loop_run (loop); ++ g_source_set_callback (source, _process_key_event_count_cb, data, NULL); ++ while (data->count) ++ g_main_context_iteration (NULL, TRUE); ++ if (source->ref_count > 0) { ++ /* g_source_get_id() could causes a SEGV */ ++ g_info ("Broken GSource.ref_count and maybe a timing issue in %p.", ++ source); ++ } + retval = data->retval; + g_slice_free (ProcessKeyEventReplyData, data); + break; +@@ -994,8 +1021,8 @@ ibus_im_context_init (GObject *obj) + #else + ibusimcontext->caps = IBUS_CAP_PREEDIT_TEXT | IBUS_CAP_FOCUS; + #endif +- if (_use_sync_mode != 1) +- ibusimcontext->caps |= IBUS_CAP_SYNC_PROCESS_KEY; ++ if (_use_sync_mode == 1) ++ ibusimcontext->caps |= IBUS_CAP_SYNC_PROCESS_KEY_V2; + + ibusimcontext->events_queue = g_queue_new (); + +@@ -1338,7 +1365,7 @@ ibus_im_context_reset (GtkIMContext *context) + * IBus uses button-press-event instead until GTK is fixed. + * https://gitlab.gnome.org/GNOME/gtk/issues/1534 + */ +- if (_use_sync_mode == 1) ++ if (_use_sync_mode != 0) + ibus_im_context_clear_preedit_text (ibusimcontext); + ibus_input_context_reset (ibusimcontext->ibuscontext); + } +@@ -1453,7 +1480,7 @@ ibus_im_context_set_client_window (GtkIMContext *context, + + if (ibusimcontext->client_window) { + #if !GTK_CHECK_VERSION (3, 98, 4) +- if (ibusimcontext->use_button_press_event && _use_sync_mode != 1) ++ if (ibusimcontext->use_button_press_event && _use_sync_mode == 0) + _connect_button_press_event (ibusimcontext, FALSE); + #endif + g_object_unref (ibusimcontext->client_window); +@@ -1463,7 +1490,7 @@ ibus_im_context_set_client_window (GtkIMContext *context, + if (client != NULL) { + ibusimcontext->client_window = g_object_ref (client); + #if !GTK_CHECK_VERSION (3, 98, 4) +- if (!ibusimcontext->use_button_press_event && _use_sync_mode != 1) ++ if (!ibusimcontext->use_button_press_event && _use_sync_mode == 0) + _connect_button_press_event (ibusimcontext, TRUE); + #endif + } +@@ -2085,7 +2112,7 @@ _ibus_context_update_preedit_text_cb (IBusInputContext *ibuscontext, + #if !GTK_CHECK_VERSION (3, 98, 4) + if (!ibusimcontext->use_button_press_event && + mode == IBUS_ENGINE_PREEDIT_COMMIT && +- _use_sync_mode != 1) { ++ _use_sync_mode == 0) { + if (ibusimcontext->client_window) { + _connect_button_press_event (ibusimcontext, TRUE); + } +@@ -2459,8 +2486,8 @@ _create_fake_input_context_done (IBusBus *bus, + NULL); + + guint32 caps = IBUS_CAP_PREEDIT_TEXT | IBUS_CAP_FOCUS | IBUS_CAP_SURROUNDING_TEXT; +- if (_use_sync_mode != 1) +- caps |= IBUS_CAP_SYNC_PROCESS_KEY; ++ if (_use_sync_mode == 1) ++ caps |= IBUS_CAP_SYNC_PROCESS_KEY_V2; + ibus_input_context_set_capabilities (_fake_context, caps); + + /* focus in/out the fake context */ +diff --git a/client/x11/main.c b/client/x11/main.c +index 6057cc03..905fd251 100644 +--- a/client/x11/main.c ++++ b/client/x11/main.c +@@ -124,7 +124,7 @@ static gint g_debug_level = 0; + + static IBusBus *_bus = NULL; + +-static gboolean _use_sync_mode = TRUE; ++static char _use_sync_mode = 2; + + static void + _xim_preedit_start (XIMS xims, const X11IC *x11ic) +@@ -331,6 +331,7 @@ xim_create_ic (XIMS xims, IMChangeICStruct *call_data) + { + static int base_icid = 1; + X11IC *x11ic; ++ guint32 capabilities = IBUS_CAP_FOCUS; + + call_data->icid = base_icid ++; + +@@ -375,12 +376,11 @@ xim_create_ic (XIMS xims, IMChangeICStruct *call_data) + G_CALLBACK (_context_disabled_cb), x11ic); + + +- if (x11ic->input_style & XIMPreeditCallbacks) { +- ibus_input_context_set_capabilities (x11ic->context, IBUS_CAP_FOCUS | IBUS_CAP_PREEDIT_TEXT); +- } +- else { +- ibus_input_context_set_capabilities (x11ic->context, IBUS_CAP_FOCUS); +- } ++ if (x11ic->input_style & XIMPreeditCallbacks) ++ capabilities |= IBUS_CAP_PREEDIT_TEXT; ++ if (_use_sync_mode == 1) ++ capabilities |= IBUS_CAP_SYNC_PROCESS_KEY_V2; ++ ibus_input_context_set_capabilities (x11ic->context, capabilities); + + g_hash_table_insert (_x11_ic_table, + GINT_TO_POINTER (x11ic->icid), (gpointer)x11ic); +@@ -461,6 +461,13 @@ xim_unset_ic_focus (XIMS xims, IMChangeFocusStruct *call_data) + + } + ++typedef struct { ++ IMForwardEventStruct *pfe; ++ int count; ++ guint count_cb_id; ++ gboolean retval; ++} ProcessKeyEventReplyData; ++ + static void + _process_key_event_done (GObject *object, + GAsyncResult *res, +@@ -493,6 +500,43 @@ _process_key_event_done (GObject *object, + g_slice_free (IMForwardEventStruct, pfe); + } + ++static void ++_process_key_event_reply_done (GObject *object, ++ GAsyncResult *res, ++ gpointer user_data) ++{ ++ IBusInputContext *context = (IBusInputContext *)object; ++ ProcessKeyEventReplyData *data = (ProcessKeyEventReplyData *)user_data; ++ GError *error = NULL; ++ gboolean retval = ibus_input_context_process_key_event_async_finish ( ++ context, ++ res, ++ &error); ++ if (error != NULL) { ++ g_warning ("Process Key Event failed: %s.", error->message); ++ g_error_free (error); ++ } ++ g_return_if_fail (data); ++ data->retval = retval; ++ data->count = 0; ++ g_source_remove (data->count_cb_id); ++} ++ ++static gboolean ++_process_key_event_count_cb (gpointer user_data) ++{ ++ ProcessKeyEventReplyData *data = (ProcessKeyEventReplyData *)user_data; ++ g_return_val_if_fail (data, G_SOURCE_REMOVE); ++ if (!data->count) ++ return G_SOURCE_REMOVE; ++ /* Wait for about 10 secs. */ ++ if (data->count++ == 10000) { ++ data->count = 0; ++ return G_SOURCE_REMOVE; ++ } ++ return G_SOURCE_CONTINUE; ++} ++ + static int + xim_forward_event (XIMS xims, IMForwardEventStruct *call_data) + { +@@ -520,14 +564,15 @@ xim_forward_event (XIMS xims, IMForwardEventStruct *call_data) + event.state |= IBUS_RELEASE_MASK; + } + +- if (_use_sync_mode) { ++ switch (_use_sync_mode) { ++ case 1: { + retval = ibus_input_context_process_key_event ( + x11ic->context, + event.keyval, + event.hardware_keycode - 8, + event.state); + if (retval) { +- if (! x11ic->has_preedit_area) { ++ if (!x11ic->has_preedit_area) { + _xim_set_cursor_location (x11ic); + } + return 1; +@@ -546,8 +591,80 @@ xim_forward_event (XIMS xims, IMForwardEventStruct *call_data) + IMForwardEvent (_xims, (XPointer) &fe); + + retval = 1; ++ break; + } +- else { ++ case 2: { ++ GSource *source = g_timeout_source_new (1); ++ ProcessKeyEventReplyData *data = NULL; ++ IMForwardEventStruct fe; ++ ++ if (source) ++ data = g_slice_new0 (ProcessKeyEventReplyData); ++ if (!data) { ++ g_warning ("Cannot wait for the reply of the process key event."); ++ retval = ibus_input_context_process_key_event ( ++ x11ic->context, ++ event.keyval, ++ event.hardware_keycode - 8, ++ event.state); ++ if (source) ++ g_source_destroy (source); ++ } else { ++ CARD16 connect_id = x11ic->connect_id; ++ data->count = 1; ++ g_source_attach (source, NULL); ++ g_source_unref (source); ++ data->count_cb_id = g_source_get_id (source); ++ ibus_input_context_process_key_event_async ( ++ x11ic->context, ++ event.keyval, ++ event.hardware_keycode - 8, ++ event.state, ++ -1, ++ NULL, ++ _process_key_event_reply_done, ++ data); ++ g_source_set_callback (source, _process_key_event_count_cb, ++ data, NULL); ++ while (data->count) ++ g_main_context_iteration (NULL, TRUE); ++ if (source->ref_count > 0) { ++ /* g_source_get_id() could causes a SEGV */ ++ g_info ("Broken GSource.ref_count and maybe a timing " ++ "issue in %p.", source); ++ } ++ retval = data->retval; ++ g_slice_free (ProcessKeyEventReplyData, data); ++ ++ if (g_hash_table_lookup (_connections, ++ GINT_TO_POINTER ((gint)connect_id)) ++ == NULL) { ++ return 1; ++ } ++ } ++ ++ if (retval) { ++ if (! x11ic->has_preedit_area) { ++ _xim_set_cursor_location (x11ic); ++ } ++ return 1; ++ } ++ ++ memset (&fe, 0, sizeof (fe)); ++ ++ fe.major_code = XIM_FORWARD_EVENT; ++ fe.icid = x11ic->icid; ++ fe.connect_id = x11ic->connect_id; ++ fe.sync_bit = 0; ++ fe.serial_number = 0L; ++ fe.event = call_data->event; ++ ++ IMForwardEvent (_xims, (XPointer) &fe); ++ ++ retval = 1; ++ break; ++ } ++ default: { + IMForwardEventStruct *pfe; + + pfe = g_slice_new0 (IMForwardEventStruct); +@@ -569,6 +686,7 @@ xim_forward_event (XIMS xims, IMForwardEventStruct *call_data) + pfe); + retval = 1; + } ++ } + return retval; + } + +@@ -1026,23 +1144,26 @@ _context_disabled_cb (IBusInputContext *context, + _xim_preedit_end (_xims, x11ic); + } + +-static gboolean +-_get_boolean_env(const gchar *name, +- gboolean defval) ++static char ++_get_char_env (const gchar *name, ++ char defval) + { + const gchar *value = g_getenv (name); + + if (value == NULL) +- return defval; ++ return defval; + + if (g_strcmp0 (value, "") == 0 || + g_strcmp0 (value, "0") == 0 || + g_strcmp0 (value, "false") == 0 || + g_strcmp0 (value, "False") == 0 || +- g_strcmp0 (value, "FALSE") == 0) +- return FALSE; ++ g_strcmp0 (value, "FALSE") == 0) { ++ return 0; ++ } else if (!g_strcmp0 (value, "2")) { ++ return 2; ++ } + +- return TRUE; ++ return 1; + } + + static void +@@ -1059,7 +1180,7 @@ _init_ibus (void) + G_CALLBACK (_bus_disconnected_cb), NULL); + + /* https://github.com/ibus/ibus/issues/1713 */ +- _use_sync_mode = _get_boolean_env ("IBUS_ENABLE_SYNC_MODE", TRUE); ++ _use_sync_mode = _get_char_env ("IBUS_ENABLE_SYNC_MODE", 2); + } + + static void +diff --git a/src/ibustypes.h b/src/ibustypes.h +index a8eee319..ba2a0010 100644 +--- a/src/ibustypes.h ++++ b/src/ibustypes.h +@@ -124,6 +124,7 @@ typedef enum { + IBUS_CAP_SURROUNDING_TEXT = 1 << 5, + IBUS_CAP_OSK = 1 << 6, + IBUS_CAP_SYNC_PROCESS_KEY = 1 << 7, ++ IBUS_CAP_SYNC_PROCESS_KEY_V2 = IBUS_CAP_SYNC_PROCESS_KEY, + } IBusCapabilite; + + /** +-- +2.41.0 + +From 497f0c74230a65309e22ce5569060ce48310406b Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Thu, 23 Mar 2023 13:07:30 +0900 +Subject: [PATCH] client/x11: Fix Key typing order + +ibus-x11 now also uses the hybrid process key events with +IBUS_ENABLE_SYNC_MODE=2 and it waits for the async API +with GSource and g_main_context_iteration() in xim_forward_event(). + +But g_main_context_iteration() calls gdk_event_source_dispatch() +and it can call another xim_forward_event() and the callbacks +of ibus_input_context_process_key_event_async() can be nested. +So if the forwarding API is called out of the callbacks of +ibus_input_context_process_key_event_async(), the key events +order is swapped due to the delayed return of +g_main_context_iteration(). + +To resolve this issue, the forwarding API should be called in +the callbacks of ibus_input_context_process_key_event_async(). + +Fixes: https://github.com/ibus/ibus/commit/506ac99 + +BUG=https://github.com/ibus/ibus/issues/2480 +--- + client/x11/main.c | 160 ++++++++++++++++++++++++---------------------- + 1 file changed, 83 insertions(+), 77 deletions(-) + +diff --git a/client/x11/main.c b/client/x11/main.c +index 905fd251..83d95cb7 100644 +--- a/client/x11/main.c ++++ b/client/x11/main.c +@@ -2,7 +2,7 @@ + /* vim:set et sts=4: */ + /* ibus + * Copyright (C) 2007-2015 Peng Huang +- * Copyright (C) 2015-2021 Takao Fujiwara ++ * Copyright (C) 2015-2023 Takao Fujiwara + * Copyright (C) 2007-2015 Red Hat, Inc. + * + * main.c: +@@ -48,6 +48,9 @@ + + #include + ++/* Wait for about 120 secs to return a key from async process-key-event. */ ++#define MAX_WAIT_KEY_TIME 120000 ++ + #define LOG(level, fmt_args...) \ + if (g_debug_level >= (level)) { \ + g_debug (fmt_args); \ +@@ -461,11 +463,39 @@ xim_unset_ic_focus (XIMS xims, IMChangeFocusStruct *call_data) + + } + ++static void ++_xim_forward_key_event_done (X11IC *x11ic, ++ XEvent *event, ++ gboolean processed) ++{ ++ IMForwardEventStruct fe; ++ if (processed) { ++ if (!x11ic->has_preedit_area) { ++ _xim_set_cursor_location (x11ic); ++ } ++ return; ++ } ++ g_assert (x11ic); ++ g_assert (event); ++ ++ memset (&fe, 0, sizeof (fe)); ++ fe.major_code = XIM_FORWARD_EVENT; ++ fe.icid = x11ic->icid; ++ fe.connect_id = x11ic->connect_id; ++ fe.sync_bit = 0; ++ fe.serial_number = 0L; ++ fe.event = *event; ++ IMForwardEvent (_xims, (XPointer) &fe); ++} ++ ++ + typedef struct { +- IMForwardEventStruct *pfe; + int count; + guint count_cb_id; + gboolean retval; ++ X11IC *x11ic; ++ CARD16 connect_id; ++ XEvent event; + } ProcessKeyEventReplyData; + + static void +@@ -474,7 +504,7 @@ _process_key_event_done (GObject *object, + gpointer user_data) + { + IBusInputContext *context = (IBusInputContext *)object; +- IMForwardEventStruct *pfe = (IMForwardEventStruct*) user_data; ++ ProcessKeyEventReplyData *data = (ProcessKeyEventReplyData *)user_data; + + GError *error = NULL; + gboolean retval = ibus_input_context_process_key_event_async_finish ( +@@ -488,16 +518,15 @@ _process_key_event_done (GObject *object, + } + + if (g_hash_table_lookup (_connections, +- GINT_TO_POINTER ((gint) pfe->connect_id)) ++ GINT_TO_POINTER ((gint)data->connect_id)) + == NULL) { +- g_slice_free (IMForwardEventStruct, pfe); ++ g_slice_free (ProcessKeyEventReplyData, data); + return; + } + +- if (retval == FALSE) { +- IMForwardEvent (_xims, (XPointer) pfe); +- } +- g_slice_free (IMForwardEventStruct, pfe); ++ if (retval == FALSE) ++ _xim_forward_key_event_done (data->x11ic, &data->event, retval); ++ g_slice_free (ProcessKeyEventReplyData, data); + } + + static void +@@ -518,6 +547,21 @@ _process_key_event_reply_done (GObject *object, + } + g_return_if_fail (data); + data->retval = retval; ++ if (g_hash_table_lookup (_connections, ++ GINT_TO_POINTER ((gint)data->connect_id)) ++ == NULL) { ++ return; ++ } ++ /* _xim_forward_key_event_done() should be called in ++ * _process_key_event_reply_done() because g_main_context_iteration() ++ * can call another xim_forward_event() and xim_forward_event() can be ++ * nested and the first _process_key_event_reply_done() is returned ++ * at last with g_main_context_iteration() so ++ * if _xim_forward_key_event_done() is called out of ++ * _process_key_event_reply_done(), the key events order ++ * can be swapped. ++ */ ++ _xim_forward_key_event_done (data->x11ic, &data->event, retval); + data->count = 0; + g_source_remove (data->count_cb_id); + } +@@ -529,9 +573,8 @@ _process_key_event_count_cb (gpointer user_data) + g_return_val_if_fail (data, G_SOURCE_REMOVE); + if (!data->count) + return G_SOURCE_REMOVE; +- /* Wait for about 10 secs. */ +- if (data->count++ == 10000) { +- data->count = 0; ++ if (data->count++ == MAX_WAIT_KEY_TIME) { ++ g_warning ("Key event is not returned for %usecs.", MAX_WAIT_KEY_TIME); + return G_SOURCE_REMOVE; + } + return G_SOURCE_CONTINUE; +@@ -571,32 +614,13 @@ xim_forward_event (XIMS xims, IMForwardEventStruct *call_data) + event.keyval, + event.hardware_keycode - 8, + event.state); +- if (retval) { +- if (!x11ic->has_preedit_area) { +- _xim_set_cursor_location (x11ic); +- } +- return 1; +- } +- +- IMForwardEventStruct fe; +- memset (&fe, 0, sizeof (fe)); +- +- fe.major_code = XIM_FORWARD_EVENT; +- fe.icid = x11ic->icid; +- fe.connect_id = x11ic->connect_id; +- fe.sync_bit = 0; +- fe.serial_number = 0L; +- fe.event = call_data->event; +- +- IMForwardEvent (_xims, (XPointer) &fe); +- ++ _xim_forward_key_event_done (x11ic, &call_data->event, retval); + retval = 1; + break; + } + case 2: { + GSource *source = g_timeout_source_new (1); + ProcessKeyEventReplyData *data = NULL; +- IMForwardEventStruct fe; + + if (source) + data = g_slice_new0 (ProcessKeyEventReplyData); +@@ -610,11 +634,13 @@ xim_forward_event (XIMS xims, IMForwardEventStruct *call_data) + if (source) + g_source_destroy (source); + } else { +- CARD16 connect_id = x11ic->connect_id; + data->count = 1; + g_source_attach (source, NULL); + g_source_unref (source); + data->count_cb_id = g_source_get_id (source); ++ data->connect_id = call_data->connect_id; ++ data->x11ic = x11ic; ++ data->event = *((XEvent*)xevent); + ibus_input_context_process_key_event_async ( + x11ic->context, + event.keyval, +@@ -626,7 +652,7 @@ xim_forward_event (XIMS xims, IMForwardEventStruct *call_data) + data); + g_source_set_callback (source, _process_key_event_count_cb, + data, NULL); +- while (data->count) ++ while (data->count > 0 && data->count < MAX_WAIT_KEY_TIME) + g_main_context_iteration (NULL, TRUE); + if (source->ref_count > 0) { + /* g_source_get_id() could causes a SEGV */ +@@ -634,46 +660,33 @@ xim_forward_event (XIMS xims, IMForwardEventStruct *call_data) + "issue in %p.", source); + } + retval = data->retval; +- g_slice_free (ProcessKeyEventReplyData, data); +- +- if (g_hash_table_lookup (_connections, +- GINT_TO_POINTER ((gint)connect_id)) +- == NULL) { ++ if (data->count == 0) { ++ g_slice_free (ProcessKeyEventReplyData, data); + return 1; + } + } + +- if (retval) { +- if (! x11ic->has_preedit_area) { +- _xim_set_cursor_location (x11ic); +- } +- return 1; ++ g_slice_free (ProcessKeyEventReplyData, data); ++ if (g_hash_table_lookup (_connections, ++ GINT_TO_POINTER ((gint)call_data->connect_id)) ++ == NULL) { ++ return 1; + } +- +- memset (&fe, 0, sizeof (fe)); +- +- fe.major_code = XIM_FORWARD_EVENT; +- fe.icid = x11ic->icid; +- fe.connect_id = x11ic->connect_id; +- fe.sync_bit = 0; +- fe.serial_number = 0L; +- fe.event = call_data->event; +- +- IMForwardEvent (_xims, (XPointer) &fe); +- ++ _xim_forward_key_event_done (x11ic, &call_data->event, retval); + retval = 1; + break; + } + default: { +- IMForwardEventStruct *pfe; ++ ProcessKeyEventReplyData *data; + +- pfe = g_slice_new0 (IMForwardEventStruct); +- pfe->major_code = XIM_FORWARD_EVENT; +- pfe->icid = x11ic->icid; +- pfe->connect_id = x11ic->connect_id; +- pfe->sync_bit = 0; +- pfe->serial_number = 0L; +- pfe->event = call_data->event; ++ if (!(data = g_slice_new0 (ProcessKeyEventReplyData))) { ++ g_warning ("Cannot allocate async data"); ++ _xim_forward_key_event_done (x11ic, &call_data->event, 0); ++ return 1; ++ } ++ data->connect_id = call_data->connect_id; ++ data->x11ic = x11ic; ++ data->event = call_data->event; + + ibus_input_context_process_key_event_async ( + x11ic->context, +@@ -683,7 +696,7 @@ xim_forward_event (XIMS xims, IMForwardEventStruct *call_data) + -1, + NULL, + _process_key_event_done, +- pfe); ++ data); + retval = 1; + } + } +@@ -962,11 +975,10 @@ _xim_forward_key_event (X11IC *x11ic, + guint keycode, + guint state) + { +- g_return_if_fail (x11ic != NULL); +- +- IMForwardEventStruct fe = {0}; + XEvent xkp = {0}; + ++ g_return_if_fail (x11ic != NULL); ++ + xkp.xkey.type = (state & IBUS_RELEASE_MASK) ? KeyRelease : KeyPress; + xkp.xkey.serial = 0L; + xkp.xkey.send_event = False; +@@ -975,20 +987,14 @@ _xim_forward_key_event (X11IC *x11ic, + xkp.xkey.window = + x11ic->focus_window ? x11ic->focus_window : x11ic->client_window; + xkp.xkey.subwindow = None; +- xkp.xkey.root = DefaultRootWindow (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ())); ++ xkp.xkey.root = DefaultRootWindow ( ++ GDK_DISPLAY_XDISPLAY (gdk_display_get_default ())); + + xkp.xkey.time = 0; + xkp.xkey.state = state; + xkp.xkey.keycode = (keycode == 0) ? 0 : keycode + 8; + +- fe.major_code = XIM_FORWARD_EVENT; +- fe.icid = x11ic->icid; +- fe.connect_id = x11ic->connect_id; +- fe.sync_bit = 0; +- fe.serial_number = 0L; +- fe.event = xkp; +- +- IMForwardEvent (_xims, (XPointer) & fe); ++ _xim_forward_key_event_done (x11ic, &xkp, FALSE); + } + + static void +-- +2.41.0 + +From 8f706d160631f1ffdbfa16543a38b9d5f91c16ad Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Thu, 23 Mar 2023 13:07:38 +0900 +Subject: [PATCH] util/IMdkit: Disable while loop before call + ForwardEventMessageProc() + +Seems ProcessQueue() had a wrong XFree() with async process-key-event. +Fixes: https://github.com/ibus/ibus/commit/506ac99 + +BUG=https://github.com/ibus/ibus/issues/2484 +--- + util/IMdkit/i18nPtHdr.c | 9 +++------ + 1 file changed, 3 insertions(+), 6 deletions(-) + +diff --git a/util/IMdkit/i18nPtHdr.c b/util/IMdkit/i18nPtHdr.c +index 8dc52714..ec20e322 100644 +--- a/util/IMdkit/i18nPtHdr.c ++++ b/util/IMdkit/i18nPtHdr.c +@@ -1747,11 +1747,13 @@ static void ProcessQueue (XIMS ims, CARD16 connect_id) + XimProtoHdr *hdr = (XimProtoHdr *) client->pending->p; + unsigned char *p1 = (unsigned char *) (hdr + 1); + IMProtocol call_data; ++ XIMPending *old = client->pending; + + call_data.major_code = hdr->major_opcode; + call_data.any.minor_code = hdr->minor_opcode; + call_data.any.connect_id = connect_id; + ++ client->pending = old->next; + switch (hdr->major_opcode) + { + case XIM_FORWARD_EVENT: +@@ -1760,12 +1762,7 @@ static void ProcessQueue (XIMS ims, CARD16 connect_id) + } + /*endswitch*/ + XFree (hdr); +- { +- XIMPending *old = client->pending; +- +- client->pending = old->next; +- XFree (old); +- } ++ XFree (old); + } + /*endwhile*/ + return; +-- +2.41.0 + +From 38f09c657fd5713e39f698aae43a09a07574f1a6 Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Wed, 12 Jul 2023 07:50:22 +0900 +Subject: [PATCH] src: Fix sync ibus_input_context_process_key_event() + +The synchronous "ProcessKeyEvent" D-Bus method cannot receive +"CommitText" and "ForwardKeyEvent" D-Bus signals during calling the method. +To resolve the issue, now +ibus_input_context_set_post_process_key_event() and +ibus_input_context_post_process_key_event() are added newly. + +ibus_input_context_post_process_key_event() retries "CommitText" and +"ForwardKeyEvent" D-Bus signals during calling the "ProcessKeyEvent" D-Bus +method and ibus-daemon does not handle those signals. + +"Since: 1.5.00" is added in header files to available APIs before 1.5.29 +is released. Will think later how to convert the version comments together +when the new version 1.5.29 is committed. + +BUG=https://github.com/ibus/ibus/issues/2486 +--- + bus/inputcontext.c | 252 ++++++++++++++++++++++++++++++++---- + client/gtk2/ibusimcontext.c | 225 ++++++++++++++++++++++---------- + src/ibusinputcontext.c | 162 +++++++++++++++++++++-- + src/ibusinputcontext.h | 36 +++++- + 4 files changed, 567 insertions(+), 108 deletions(-) + +diff --git a/bus/inputcontext.c b/bus/inputcontext.c +index 8aded5d8..4d1fb041 100644 +--- a/bus/inputcontext.c ++++ b/bus/inputcontext.c +@@ -31,6 +31,8 @@ + #include "marshalers.h" + #include "types.h" + ++#define MAX_SYNC_DATA 30 ++ + struct _SetEngineByDescData { + /* context related to the data */ + BusInputContext *context; +@@ -46,6 +48,11 @@ struct _SetEngineByDescData { + }; + typedef struct _SetEngineByDescData SetEngineByDescData; + ++typedef struct _SyncForwardingData { ++ gchar key; ++ IBusText *text; ++} SyncForwardingData; ++ + struct _BusInputContext { + IBusService parent; + +@@ -99,6 +106,9 @@ struct _BusInputContext { + + BusPanelProxy *emoji_extension; + gboolean is_extension_lookup_table; ++ GQueue *queue_during_process_key_event; ++ gboolean use_post_process_key_event; ++ gboolean processing_key_event; + }; + + struct _BusInputContextClass { +@@ -156,6 +166,15 @@ static void bus_input_context_service_method_call + const gchar *method_name, + GVariant *parameters, + GDBusMethodInvocation *invocation); ++static GVariant * ++ bus_input_context_service_get_property ++ (IBusService *service, ++ GDBusConnection *connection, ++ const gchar *sender, ++ const gchar *object_path, ++ const gchar *interface_name, ++ const gchar *property_name, ++ GError **error); + static gboolean bus_input_context_service_set_property + (IBusService *service, + GDBusConnection *connection, +@@ -214,8 +233,21 @@ static const gchar introspection_xml[] = + "" + " " + /* properties */ ++ " \n" ++ " \n" ++ " \n" ++ " \n" + " " + " \n" ++ " \n" ++ " \n" ++ " \n" ++ " \n" + /* methods */ + " " + " " +@@ -348,6 +380,8 @@ bus_input_context_class_init (BusInputContextClass *class) + /* override the parent class's implementation. */ + IBUS_SERVICE_CLASS (class)->service_method_call = + bus_input_context_service_method_call; ++ IBUS_SERVICE_CLASS (class)->service_get_property = ++ bus_input_context_service_get_property; + IBUS_SERVICE_CLASS (class)->service_set_property = + bus_input_context_service_set_property; + /* register the xml so that bus_ibus_impl_service_method_call will be called on a method call defined in the xml (e.g. 'FocusIn'.) */ +@@ -782,6 +816,11 @@ bus_input_context_property_changed (BusInputContext *context, + } + + ++typedef struct _PanelProcessKeyEventData { ++ GDBusMethodInvocation *invocation; ++ BusInputContext *context; ++} PanelProcessKeyEventData; ++ + /** + * _panel_process_key_event_cb: + * +@@ -789,14 +828,21 @@ bus_input_context_property_changed (BusInputContext *context, + * bus_panel_proxy_process_key_event() is finished. + */ + static void +-_panel_process_key_event_cb (GObject *source, +- GAsyncResult *res, +- GDBusMethodInvocation *invocation) ++_panel_process_key_event_cb (GObject *source, ++ GAsyncResult *res, ++ PanelProcessKeyEventData *data) + { + GError *error = NULL; + GVariant *value = g_dbus_proxy_call_finish ((GDBusProxy *)source, + res, + &error); ++ GDBusMethodInvocation *invocation; ++ BusInputContext *context; ++ ++ g_assert (data); ++ invocation = data->invocation; ++ context = data->context; ++ g_slice_free (PanelProcessKeyEventData, data); + if (value != NULL) { + g_dbus_method_invocation_return_value (invocation, value); + g_variant_unref (value); +@@ -805,6 +851,7 @@ _panel_process_key_event_cb (GObject *source, + g_dbus_method_invocation_return_gerror (invocation, error); + g_error_free (error); + } ++ context->processing_key_event = FALSE; + } + + typedef struct _ProcessKeyEventData ProcessKeyEventData; +@@ -841,21 +888,27 @@ _ic_process_key_event_reply_cb (GObject *source, + gboolean retval = FALSE; + g_variant_get (value, "(b)", &retval); + if (context->emoji_extension && !retval) { ++ PanelProcessKeyEventData *pdata = ++ g_slice_new (PanelProcessKeyEventData); ++ pdata->invocation = invocation; ++ pdata->context = context; + bus_panel_proxy_process_key_event (context->emoji_extension, + keyval, + keycode, + modifiers, + (GAsyncReadyCallback) + _panel_process_key_event_cb, +- invocation); ++ pdata); + } else { + g_dbus_method_invocation_return_value (invocation, value); ++ context->processing_key_event = FALSE; + } + g_variant_unref (value); + } + else { + g_dbus_method_invocation_return_gerror (invocation, error); + g_error_free (error); ++ context->processing_key_event = FALSE; + } + + g_object_unref (context); +@@ -877,6 +930,8 @@ _ic_process_key_event (BusInputContext *context, + guint keycode = 0; + guint modifiers = 0; + ++ if (context->use_post_process_key_event) ++ context->processing_key_event = TRUE; + g_variant_get (parameters, "(uuu)", &keyval, &keycode, &modifiers); + if (G_UNLIKELY (!context->has_focus)) { + /* workaround: set focus if context does not have focus */ +@@ -1372,17 +1427,109 @@ bus_input_context_service_method_call (IBusService *service, + g_return_if_reached (); + } + +-static void ++/** ++ * _ic_get_post_process_key_event: ++ * ++ * Implement the "PostProcessKeyEvent" get property of the ++ * org.freedesktop.IBus.InputContext interface because currently the Gio ++ * D-Bus method calls don't support multiple nested tuples likes ++ * G_VARIANT_TYPE ("((ba(yv)))")) in "ProcessKeyEvent" D-Bus method ++ * So these post events are separated from the return value "b" of ++ * the "ProcessKeyEvent" D-Bus method call. ++ */ ++static GVariant * ++_ic_get_post_process_key_event (BusInputContext *context, ++ GDBusConnection *connection, ++ GError **error) ++{ ++ const char *error_message = NULL; ++ GVariantBuilder array; ++ SyncForwardingData *data; ++ ++ do { ++ if (!BUS_IS_INPUT_CONTEXT (context)) { ++ error_message = "BusInputContext is freed"; ++ break; ++ } ++ if (context->processing_key_event) { ++ error_message = "Another ProcessKeyEvent is called."; ++ break; ++ } ++ g_variant_builder_init (&array, G_VARIANT_TYPE ("a(yv)")); ++ while ((data = ++ g_queue_pop_head (context->queue_during_process_key_event))) { ++ GVariant *variant = ibus_serializable_serialize_object ( ++ IBUS_SERIALIZABLE (data->text)); ++ g_variant_builder_add (&array, "(yv)", data->key, variant); ++ g_object_unref (data->text); ++ g_slice_free (SyncForwardingData, data); ++ } ++ } while (FALSE); ++ if (error_message) { ++ g_set_error (error, ++ G_DBUS_ERROR, ++ G_DBUS_ERROR_FAILED, ++ "%s", error_message); ++ return NULL; ++ } ++ return g_variant_builder_end (&array); ++} ++ ++static GVariant * ++bus_input_context_service_get_property (IBusService *service, ++ GDBusConnection *connection, ++ const gchar *sender, ++ const gchar *object_path, ++ const gchar *interface_name, ++ const gchar *property_name, ++ GError **error) ++{ ++ int i; ++ static const struct { ++ const char *property_name; ++ GVariant * (* property_callback) (BusInputContext *, ++ GDBusConnection *, ++ GError **); ++ } properties [] = { ++ { "PostProcessKeyEvent", _ic_get_post_process_key_event }, ++ }; ++ ++ if (error) ++ *error = NULL; ++ if (g_strcmp0 (interface_name, IBUS_INTERFACE_INPUT_CONTEXT) != 0) { ++ return IBUS_SERVICE_CLASS (bus_input_context_parent_class)-> ++ service_get_property ( ++ service, connection, sender, object_path, ++ interface_name, property_name, ++ error); ++ } ++ for (i = 0; i < G_N_ELEMENTS (properties); i++) { ++ if (g_strcmp0 (properties[i].property_name, property_name) == 0) { ++ return properties[i].property_callback ((BusInputContext *)service, ++ connection, ++ error); ++ } ++ } ++ ++ g_set_error (error, ++ G_DBUS_ERROR, ++ G_DBUS_ERROR_FAILED, ++ "service_get_property received an unknown property: %s", ++ property_name ? property_name : "(null)"); ++ g_return_val_if_reached (NULL); ++} ++ ++static gboolean + _ic_set_content_type (BusInputContext *context, +- GVariant *value) ++ GVariant *value, ++ GError **error) + { + guint purpose = 0; + guint hints = 0; ++ gboolean retval = TRUE; + + g_variant_get (value, "(uu)", &purpose, &hints); + if (purpose != context->purpose || hints != context->hints) { +- GError *error; +- gboolean retval; + + context->purpose = purpose; + context->hints = hints; +@@ -1400,24 +1547,30 @@ _ic_set_content_type (BusInputContext *context, + context->hints); + } + +- error = NULL; + retval = bus_input_context_property_changed (context, + "ContentType", + value, +- &error); +- if (!retval) { +- g_warning ("Failed to emit PropertiesChanged signal: %s", +- error->message); +- g_error_free (error); +- } ++ error); + } ++ return retval; + } + +-static void ++static gboolean + _ic_set_client_commit_preedit (BusInputContext *context, +- GVariant *value) ++ GVariant *value, ++ GError **error) + { + g_variant_get (value, "(b)", &context->client_commit_preedit); ++ return TRUE; ++} ++ ++static gboolean ++_ic_set_use_post_process_key_event (BusInputContext *context, ++ GVariant *value, ++ GError **error) ++{ ++ g_variant_get (value, "(b)", &context->use_post_process_key_event); ++ return TRUE; + } + + static gboolean +@@ -1384,6 +1548,18 @@ bus_input_context_service_set_property ( + GVariant *value, + GError **error) + { ++ int i; ++ static const struct { ++ const char *property_name; ++ gboolean (* property_callback) (BusInputContext *, ++ GVariant *, ++ GError **); ++ } properties [] = { ++ { "ContentType", _ic_set_content_type }, ++ { "ClientCommitPreedit", _ic_set_client_commit_preedit }, ++ { "EffectivePostProcessKeyEvent", _ic_set_use_post_process_key_event }, ++ }; ++ + if (g_strcmp0 (interface_name, IBUS_INTERFACE_INPUT_CONTEXT) != 0) { + return IBUS_SERVICE_CLASS (bus_input_context_parent_class)-> + service_set_property (service, +@@ -1401,13 +1566,12 @@ bus_input_context_service_set_property ( + + g_return_val_if_fail (BUS_IS_INPUT_CONTEXT (service), FALSE); + +- if (g_strcmp0 (property_name, "ContentType") == 0) { +- _ic_set_content_type (BUS_INPUT_CONTEXT (service), value); +- return TRUE; +- } +- if (g_strcmp0 (property_name, "ClientCommitPreedit") == 0) { +- _ic_set_client_commit_preedit (BUS_INPUT_CONTEXT (service), value); +- return TRUE; ++ for (i = 0; i < G_N_ELEMENTS (properties); i++) { ++ if (g_strcmp0 (properties[i].property_name, property_name) == 0) { ++ return properties[i].property_callback ((BusInputContext *) service, ++ value, ++ error); ++ } + } + + g_return_val_if_reached (FALSE); +@@ -2094,7 +2258,23 @@ _engine_forward_key_event_cb (BusEngineProxy *engine, + g_assert (BUS_IS_INPUT_CONTEXT (context)); + + g_assert (context->engine == engine); ++ g_assert (context->queue_during_process_key_event); + ++ if (context->processing_key_event && g_queue_get_length ( ++ context->queue_during_process_key_event) <= MAX_SYNC_DATA) { ++ SyncForwardingData *data; ++ IBusText *text = ibus_text_new_from_printf ("%u,%u,%u", ++ keyval, keycode, state); ++ if (g_queue_get_length (context->queue_during_process_key_event) ++ == MAX_SYNC_DATA) { ++ g_warning ("Exceed max number of post process_key_event data"); ++ } ++ data = g_slice_new (SyncForwardingData); ++ data->key = 'f'; ++ data->text = text; ++ g_queue_push_tail (context->queue_during_process_key_event, data); ++ return; ++ } + bus_input_context_emit_signal (context, + "ForwardKeyEvent", + g_variant_new ("(uuu)", keyval, keycode, state), +@@ -2455,6 +2634,7 @@ bus_input_context_new (BusConnection *connection, + + /* it is a fake input context, just need process hotkey */ + context->fake = (strncmp (client, "fake", 4) == 0); ++ context->queue_during_process_key_event = g_queue_new (); + + if (connection) { + g_object_ref_sink (connection); +@@ -2938,11 +3118,17 @@ bus_input_context_set_content_type (BusInputContext *context, + guint hints) + { + GVariant *value; ++ GError *error = NULL; + + g_assert (BUS_IS_INPUT_CONTEXT (context)); + + value = g_variant_ref_sink (g_variant_new ("(uu)", purpose, hints)); +- _ic_set_content_type (context, value); ++ _ic_set_content_type (context, value, &error); ++ if (error) { ++ g_warning ("Failed to emit PropertiesChanged signal: %s", ++ error->message); ++ g_error_free (error); ++ } + g_variant_unref (value); + } + +@@ -2952,12 +3138,24 @@ bus_input_context_commit_text_use_extension (BusInputContext *context, + gboolean use_extension) + { + g_assert (BUS_IS_INPUT_CONTEXT (context)); ++ g_assert (context->queue_during_process_key_event); + + if (text == text_empty || text == NULL) + return; + + if (use_extension && context->emoji_extension) { + bus_panel_proxy_commit_text_received (context->emoji_extension, text); ++ } else if (context->processing_key_event && g_queue_get_length ( ++ context->queue_during_process_key_event) <= MAX_SYNC_DATA) { ++ SyncForwardingData *data; ++ if (g_queue_get_length (context->queue_during_process_key_event) ++ == MAX_SYNC_DATA) { ++ g_warning ("Exceed max number of sync process_key_event data"); ++ } ++ data = g_slice_new (SyncForwardingData); ++ data->key = 'c'; ++ data->text = g_object_ref (text); ++ g_queue_push_tail (context->queue_during_process_key_event, data); + } else { + GVariant *variant = ibus_serializable_serialize ( + (IBusSerializable *)text); +diff --git a/client/gtk2/ibusimcontext.c b/client/gtk2/ibusimcontext.c +index ea8270bb..7ccc129d 100644 +--- a/client/gtk2/ibusimcontext.c ++++ b/client/gtk2/ibusimcontext.c +@@ -111,7 +111,7 @@ static guint _signal_delete_surrounding_id = 0; + static guint _signal_retrieve_surrounding_id = 0; + + #if GTK_CHECK_VERSION (3, 98, 4) +-static char _use_sync_mode = 2; ++static char _use_sync_mode = 1; + #else + static const gchar *_no_snooper_apps = NO_SNOOPER_APPS; + static gboolean _use_key_snooper = ENABLE_SNOOPER; +@@ -386,6 +386,7 @@ typedef struct { + gboolean retval; + } ProcessKeyEventReplyData; + ++ + static void + _process_key_event_done (GObject *object, + GAsyncResult *res, +@@ -435,6 +436,7 @@ _process_key_event_done (GObject *object, + #endif + } + ++ + static void + _process_key_event_reply_done (GObject *object, + GAsyncResult *res, +@@ -457,6 +459,7 @@ _process_key_event_reply_done (GObject *object, + g_source_remove (data->count_cb_id); + } + ++ + static gboolean + _process_key_event_count_cb (gpointer user_data) + { +@@ -472,6 +475,101 @@ _process_key_event_count_cb (gpointer user_data) + return G_SOURCE_CONTINUE; + } + ++ ++static gboolean ++_process_key_event_sync (IBusInputContext *context, ++ guint keyval, ++ guint keycode, ++ guint state) ++{ ++ gboolean retval; ++ ++ g_assert (IBUS_IS_INPUT_CONTEXT (context)); ++ retval = ibus_input_context_process_key_event (context, ++ keyval, ++ keycode - 8, ++ state); ++ ibus_input_context_post_process_key_event (context); ++ return retval; ++} ++ ++ ++static gboolean ++_process_key_event_async (IBusInputContext *context, ++ guint keyval, ++ guint keycode, ++ guint state, ++ GdkEvent *event, ++ IBusIMContext *ibusimcontext) ++{ ++ ProcessKeyEventData *data = g_slice_new0 (ProcessKeyEventData); ++ ++ g_assert (event); ++ if (!data) { ++ g_warning ("Cannot allocate async data"); ++ return _process_key_event_sync (context, keyval, keycode, state); ++ } ++#if GTK_CHECK_VERSION (3, 98, 4) ++ data->event = gdk_event_ref (event); ++#else ++ data->event = gdk_event_copy (event); ++#endif ++ data->ibusimcontext = ibusimcontext; ++ ibus_input_context_process_key_event_async (context, ++ keyval, ++ keycode - 8, ++ state, ++ -1, ++ NULL, ++ _process_key_event_done, ++ data); ++ ++ return TRUE; ++} ++ ++ ++static gboolean ++_process_key_event_hybrid_async (IBusInputContext *context, ++ guint keyval, ++ guint keycode, ++ guint state) ++{ ++ GSource *source = g_timeout_source_new (1); ++ ProcessKeyEventReplyData *data = NULL; ++ gboolean retval = FALSE; ++ ++ if (source) ++ data = g_slice_new0 (ProcessKeyEventReplyData); ++ if (!data) { ++ g_warning ("Cannot wait for the reply of the process key event."); ++ retval = _process_key_event_sync (context, keyval, keycode, state); ++ if (source) ++ g_source_destroy (source); ++ return retval; ++ } ++ data->count = 1; ++ g_source_attach (source, NULL); ++ g_source_unref (source); ++ data->count_cb_id = g_source_get_id (source); ++ ibus_input_context_process_key_event_async (context, ++ keyval, ++ keycode - 8, ++ state, ++ -1, ++ NULL, ++ _process_key_event_reply_done, ++ data); ++ g_source_set_callback (source, _process_key_event_count_cb, data, NULL); ++ while (data->count) ++ g_main_context_iteration (NULL, TRUE); ++ /* #2498 Checking source->ref_count might cause Nautilus hang up ++ */ ++ retval = data->retval; ++ g_slice_free (ProcessKeyEventReplyData, data); ++ return retval; ++} ++ ++ + static gboolean + _process_key_event (IBusInputContext *context, + #if GTK_CHECK_VERSION (3, 98, 4) +@@ -505,70 +603,20 @@ _process_key_event (IBusInputContext *context, + + switch (_use_sync_mode) { + case 1: { +- retval = ibus_input_context_process_key_event (context, +- keyval, +- keycode - 8, +- state); ++ retval = _process_key_event_sync (context, keyval, keycode, state); + break; + } + case 2: { +- GSource *source = g_timeout_source_new (1); +- ProcessKeyEventReplyData *data = NULL; +- +- if (source) +- data = g_slice_new0 (ProcessKeyEventReplyData); +- if (!data) { +- g_warning ("Cannot wait for the reply of the process key event."); +- retval = ibus_input_context_process_key_event (context, +- keyval, +- keycode - 8, +- state); +- if (source) +- g_source_destroy (source); +- break; +- } +- data->count = 1; +- g_source_attach (source, NULL); +- g_source_unref (source); +- data->count_cb_id = g_source_get_id (source); +- ibus_input_context_process_key_event_async (context, +- keyval, +- keycode - 8, +- state, +- -1, +- NULL, +- _process_key_event_reply_done, +- data); +- g_source_set_callback (source, _process_key_event_count_cb, data, NULL); +- while (data->count) +- g_main_context_iteration (NULL, TRUE); +- if (source->ref_count > 0) { +- /* g_source_get_id() could causes a SEGV */ +- g_info ("Broken GSource.ref_count and maybe a timing issue in %p.", +- source); +- } +- retval = data->retval; +- g_slice_free (ProcessKeyEventReplyData, data); ++ retval = _process_key_event_hybrid_async (context, ++ keyval, keycode, state); + break; + } + default: { +- ProcessKeyEventData *data = g_slice_new0 (ProcessKeyEventData); +-#if GTK_CHECK_VERSION (3, 98, 4) +- data->event = gdk_event_ref (event); +-#else +- data->event = gdk_event_copy ((GdkEvent *)event); +-#endif +- data->ibusimcontext = ibusimcontext; +- ibus_input_context_process_key_event_async (context, +- keyval, +- keycode - 8, +- state, +- -1, +- NULL, +- _process_key_event_done, +- data); +- +- retval = TRUE; ++ retval = _process_key_event_async (context, ++ keyval, keycode, state, ++ (GdkEvent *)event, ++ ibusimcontext); ++ break; + } + } + +@@ -877,7 +925,55 @@ ibus_im_context_class_init (IBusIMContextClass *class) + g_assert (_signal_retrieve_surrounding_id != 0); + + #if GTK_CHECK_VERSION (3, 98, 4) +- _use_sync_mode = _get_char_env ("IBUS_ENABLE_SYNC_MODE", 2); ++ /* IBus GtkIMModule, QtIMModlue, ibus-x11, ibus-wayland are called as ++ * IBus clients. ++ * Each GTK application, each QT application, Xorg server, Wayland ++ * comppsitor are called as IBus event owners here. ++ * ++ * The IBus client processes the key events between the IBus event owner ++ * and the IBus daemon and the procedure step is to: ++ * ++ * receive the key event from the IBus event owner and forward the ++ * event to the IBus daemon with the "ProcessKeyEvent" D-Bus method at ++ * first, ++ * ++ * receive the return value from the IBus daemon with the "ProessKeyEvent" ++ * D-Bus method and forward the value to the IBus event owner secondly and ++ * the return value includes if the key event is processed normally or not. ++ * ++ * The procedure behavior can be changed by the "IBUS_ENABLE_SYNC_MODE" ++ * environment variable with the synchronous procedure or asynchronous ++ * one and value is: ++ * ++ * 1: Synchronous process key event: ++ * Wait for the return of the IBus "ProcessKeyEvent" D-Bus method ++ * synchronously and forward the return value to the IBus event owner ++ * synchronously. ++ * 0: Asynchronous process key event: ++ * Return to the IBus event owner as the key event is processed normally ++ * at first as soon as the IBus client receives the event from the ++ * IBus event owner and also forward the event to the IBus daemon with ++ * the "ProcessKeyEvent" D-Bus method and wait for the return value of ++ * the D-Bus method *asynchronously*. ++ * If the return value indicates the key event is disposed by IBus, ++ * the IBus client does not perform anything. Otherwise the IBus client ++ * forwards the key event with the gdk_event_put() in GTK3, ++ * gtk_im_context_filter_key() in GTK4, IMForwardEvent() in XIM API. ++ * 2: Hybrid asynchronous process key event: ++ * Wait for the return of the IBus "ProcessKeyEvent" D-Bus method ++ * *asynchronously* with a GSource loop and forward the return value ++ * to the IBus event owner synchronously. So IBus clients perform ++ * virtually synchronously to cover problems of IBus synchronous APIs. ++ * ++ * The purpose of the asynchronous process is that each IBus input ++ * method can process the key events without D-Bus timeout and also ++ * the IBus synchronous process has a problem that the IBus ++ * "ProcessKeyEvent" D-Bus method cannot send the commit-text and ++ * forwar-key-event D-Bus signals until the D-Bus method is finished. ++ * ++ * Relative issues: #1713, #2486 ++ */ ++ _use_sync_mode = _get_char_env ("IBUS_ENABLE_SYNC_MODE", 1); + #else + _use_key_snooper = !_get_boolean_env ("IBUS_DISABLE_SNOOPER", + !(ENABLE_SNOOPER)); +@@ -1004,8 +1100,6 @@ ibus_im_context_init (GObject *obj) + #else + ibusimcontext->caps = IBUS_CAP_PREEDIT_TEXT | IBUS_CAP_FOCUS; + #endif +- if (_use_sync_mode == 1) +- ibusimcontext->caps |= IBUS_CAP_SYNC_PROCESS_KEY_V2; + + ibusimcontext->events_queue = g_queue_new (); + +@@ -2235,6 +2329,8 @@ _create_input_context_done (IBusBus *bus, + } + else { + ibus_input_context_set_client_commit_preedit (context, TRUE); ++ if (_use_sync_mode == 1) ++ ibus_input_context_set_post_process_key_event (context, TRUE); + ibusimcontext->ibuscontext = context; + + g_signal_connect (ibusimcontext->ibuscontext, +@@ -2489,9 +2585,8 @@ _create_fake_input_context_done (IBusBus *bus, + G_CALLBACK (_ibus_fake_context_destroy_cb), + NULL); + +- guint32 caps = IBUS_CAP_PREEDIT_TEXT | IBUS_CAP_FOCUS | IBUS_CAP_SURROUNDING_TEXT; +- if (_use_sync_mode == 1) +- caps |= IBUS_CAP_SYNC_PROCESS_KEY_V2; ++ guint32 caps = IBUS_CAP_PREEDIT_TEXT | IBUS_CAP_FOCUS ++ | IBUS_CAP_SURROUNDING_TEXT; + ibus_input_context_set_capabilities (_fake_context, caps); + + /* focus in/out the fake context */ +diff --git a/src/ibusinputcontext.c b/src/ibusinputcontext.c +index 28ae04ad..def23b25 100644 +--- a/src/ibusinputcontext.c ++++ b/src/ibusinputcontext.c +@@ -2,7 +2,7 @@ + /* vim:set et sts=4: */ + /* ibus - The Input Bus + * Copyright (C) 2008-2013 Peng Huang +- * Copyright (C) 2018-2019 Takao Fujiwara ++ * Copyright (C) 2018-2023 Takao Fujiwara + * Copyright (C) 2008-2019 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or +@@ -1190,14 +1190,14 @@ ibus_input_context_set_content_type (IBusInputContext *context, + g_assert (IBUS_IS_INPUT_CONTEXT (context)); + + cached_content_type = +- g_dbus_proxy_get_cached_property ((GDBusProxy *) context, ++ g_dbus_proxy_get_cached_property ((GDBusProxy *)context, + "ContentType"); + content_type = g_variant_new ("(uu)", purpose, hints); + + g_variant_ref_sink (content_type); +- if (cached_content_type == NULL || ++ if (!cached_content_type || + !g_variant_equal (content_type, cached_content_type)) { +- g_dbus_proxy_call ((GDBusProxy *) context, ++ g_dbus_proxy_call ((GDBusProxy *)context, + "org.freedesktop.DBus.Properties.Set", + g_variant_new ("(ssv)", + IBUS_INTERFACE_INPUT_CONTEXT, +@@ -1209,9 +1209,13 @@ ibus_input_context_set_content_type (IBusInputContext *context, + NULL, /* callback */ + NULL /* user_data */ + ); ++ /* Need to update the cache by manual since there is a timing issue. */ ++ g_dbus_proxy_set_cached_property ((GDBusProxy *)context, ++ "ContentType", ++ content_type); + } + +- if (cached_content_type != NULL) ++ if (cached_content_type) + g_variant_unref (cached_content_type); + g_variant_unref (content_type); + } +@@ -1324,19 +1328,20 @@ void + ibus_input_context_set_client_commit_preedit (IBusInputContext *context, + gboolean client_commit) + { +- GVariant *cached_content_type; ++ GVariant *cached_var_client_commit; + GVariant *var_client_commit; + + g_assert (IBUS_IS_INPUT_CONTEXT (context)); + +- cached_content_type = +- g_dbus_proxy_get_cached_property ((GDBusProxy *) context, ++ cached_var_client_commit = ++ g_dbus_proxy_get_cached_property ((GDBusProxy *)context, + "ClientCommitPreedit"); + var_client_commit = g_variant_new ("(b)", client_commit); + + g_variant_ref_sink (var_client_commit); +- if (cached_content_type == NULL) { +- g_dbus_proxy_call ((GDBusProxy *) context, ++ if (!cached_var_client_commit || ++ !g_variant_equal (var_client_commit, cached_var_client_commit)) { ++ g_dbus_proxy_call ((GDBusProxy *)context, + "org.freedesktop.DBus.Properties.Set", + g_variant_new ("(ssv)", + IBUS_INTERFACE_INPUT_CONTEXT, +@@ -1348,13 +1353,146 @@ ibus_input_context_set_client_commit_preedit (IBusInputContext *context, + NULL, /* callback */ + NULL /* user_data */ + ); ++ /* Need to update the cache by manual since there is a timing issue. */ ++ g_dbus_proxy_set_cached_property ((GDBusProxy *)context, ++ "ClientCommitPreedit", ++ var_client_commit); + } + +- if (cached_content_type != NULL) +- g_variant_unref (cached_content_type); ++ if (cached_var_client_commit) ++ g_variant_unref (cached_var_client_commit); + g_variant_unref (var_client_commit); + } + ++void ++ibus_input_context_set_post_process_key_event (IBusInputContext *context, ++ gboolean enable) ++{ ++ GVariant *cached_var_post; ++ GVariant *var_post; ++ ++ g_assert (IBUS_IS_INPUT_CONTEXT (context)); ++ ++ cached_var_post = ++ g_dbus_proxy_get_cached_property ((GDBusProxy *)context, ++ "EffectivePostProcessKeyEvent"); ++ var_post = g_variant_new ("(b)", enable); ++ g_variant_ref_sink (var_post); ++ if (!cached_var_post || ++ !g_variant_equal (var_post, cached_var_post)) { ++ g_dbus_proxy_call ((GDBusProxy *)context, ++ "org.freedesktop.DBus.Properties.Set", ++ g_variant_new ("(ssv)", ++ IBUS_INTERFACE_INPUT_CONTEXT, ++ "EffectivePostProcessKeyEvent", ++ var_post), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ NULL, /* cancellable */ ++ NULL, /* callback */ ++ NULL /* user_data */ ++ ); ++ /* Need to update the cache by manual since there is a timing issue. */ ++ g_dbus_proxy_set_cached_property ((GDBusProxy *)context, ++ "EffectivePostProcessKeyEvent", ++ var_post); ++ } ++ ++ if (cached_var_post) ++ g_variant_unref (cached_var_post); ++ g_variant_unref (var_post); ++} ++ ++void ++ibus_input_context_post_process_key_event (IBusInputContext *context) ++{ ++ GVariant *cached_var_post; ++ gboolean enable = FALSE; ++ GVariant *result; ++ GError *error = NULL; ++ GVariant *variant = NULL; ++ GVariantIter iter; ++ gsize size; ++ char type = 0; ++ GVariant *vtext = NULL; ++ ++ g_assert (IBUS_IS_INPUT_CONTEXT (context)); ++ ++ cached_var_post = ++ g_dbus_proxy_get_cached_property ((GDBusProxy *)context, ++ "EffectivePostProcessKeyEvent"); ++ if (cached_var_post) ++ g_variant_get (cached_var_post, "(b)", &enable); ++ if (!enable) { ++ g_warning ("%s: ibus_input_context_set_post_process_key_event() " ++ "needs to be called before.", ++ G_STRFUNC); ++ if (cached_var_post) ++ g_variant_unref (cached_var_post); ++ return; ++ } ++ g_variant_unref (cached_var_post); ++ result = g_dbus_proxy_call_sync ( ++ (GDBusProxy *)context, ++ "org.freedesktop.DBus.Properties.Get", ++ g_variant_new ("(ss)", ++ IBUS_INTERFACE_INPUT_CONTEXT, ++ "PostProcessKeyEvent"), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ NULL, ++ &error); ++ if (error) { ++ g_warning ("%s: %s", G_STRFUNC, error->message); ++ g_error_free (error); ++ return; ++ } ++ ++ g_variant_get (result, "(v)", &variant); ++ g_assert (variant); ++ g_variant_iter_init (&iter, variant); ++ size = g_variant_iter_n_children (&iter); ++ while (size >0 && g_variant_iter_loop (&iter, "(yv)", &type, &vtext)) { ++ IBusText *text = ++ (IBusText *)ibus_serializable_deserialize_object (vtext); ++ if (!IBUS_IS_TEXT (text)) { ++ g_warning ("%s: %s", G_STRFUNC, "text is not IBusText"); ++ break; ++ } ++ switch (type) { ++ case 'c': ++ g_signal_emit (context, context_signals[COMMIT_TEXT], 0, text); ++ break; ++ case 'f': { ++ gchar **array = NULL; ++ guint keyval, keycode, state; ++ array = g_strsplit (text->text, ",", -1); ++ keyval = g_ascii_strtoull (array[0], NULL, 10); ++ keycode = g_ascii_strtoull (array[1], NULL, 10); ++ state = g_ascii_strtoull (array[2], NULL, 10); ++ g_strfreev (array); ++ g_signal_emit (context, ++ context_signals[FORWARD_KEY_EVENT], ++ 0, ++ keyval, ++ keycode, ++ state | IBUS_FORWARD_MASK); ++ break; ++ } ++ default: ++ g_warning ("%s: Type '%c' is not supported.", G_STRFUNC, type); ++ } ++ if (g_object_is_floating (text)) { ++ g_object_ref_sink (text); ++ g_object_unref (text); ++ } ++ g_clear_pointer (&vtext, g_variant_unref); ++ } ++ ++ g_variant_unref (variant); ++ g_variant_unref (result); ++} ++ + #define DEFINE_FUNC(name, Name) \ + void \ + ibus_input_context_##name (IBusInputContext *context) \ +diff --git a/src/ibusinputcontext.h b/src/ibusinputcontext.h +index 09992148..ca604670 100644 +--- a/src/ibusinputcontext.h ++++ b/src/ibusinputcontext.h +@@ -2,7 +2,7 @@ + /* vim:set et sts=4: */ + /* ibus - The Input Bus + * Copyright (C) 2008-2013 Peng Huang +- * Copyright (C) 2018 Takao Fujiwara ++ * Copyright (C) 2018-2023 Takao Fujiwara + * Copyright (C) 2008-2018 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or +@@ -298,7 +298,6 @@ gboolean ibus_input_context_process_key_event + guint32 keycode, + guint32 state); + +- + /** + * ibus_input_context_set_cursor_location: + * @context: An IBusInputContext. +@@ -519,9 +518,38 @@ void ibus_input_context_set_content_type + * + * See also ibus_engine_update_preedit_text_with_mode(). + */ +-void ibus_input_context_set_client_commit_preedit ( +- IBusInputContext *context, ++void ibus_input_context_set_client_commit_preedit ++ (IBusInputContext *context, + gboolean client_commit); + ++/** ++ * ibus_input_context_set_post_process_key_event: ++ * @context: An #IBusInputContext. ++ * @enable: Can use ibus_input_context_post_process_key_event() to retrieve ++ * commit-text and forwar-key-event signals during ++ * calling ibus_input_context_process_key_event() if it's %TRUE. ++ * ++ * Since: 1.5.00 ++ * Stability: Unstable ++ */ ++void ibus_input_context_set_post_process_key_event ++ (IBusInputContext *context, ++ gboolean enable); ++/** ++ * ibus_input_context_post_process_key_event: ++ * @context: An #IBusInputContext. ++ * ++ * Call this API after ibus_input_context_process_key_event() returns ++ * to retrieve commit-text and forwar-key-event signals during ++ * calling ibus_input_context_process_key_event(). ++ * ++ * See also ibus_input_context_set_post_process_key_event(). ++ * ++ * Since: 1.5.00 ++ * Stability: Unstable ++ */ ++void ibus_input_context_post_process_key_event ++ (IBusInputContext *context); ++ + G_END_DECLS + #endif +-- +2.41.0 + +From 86d9bb9a1cbd4ffbd6bc2a4de85cb76a43bc2ced Mon Sep 17 00:00:00 2001 +From: Peng Wu +Date: Mon, 24 Jul 2023 14:04:12 +0800 +Subject: [PATCH] client/gtk2: Update set_cursor_location function to use Gdk + functions + +For ibus-gtk4, use the Gdk functions to get the inner cursor location. +The inner cursor location is translated by XTranslateCoordinates +for X Window. +For ibus-gtk3, use gdk_window_get_root_coords function to translate the +inner cursor location for X Window. +In Wayland, the set_cursor_location_relative function is called. +In X Window, the set_cursor_location function is called. + +Fixes: https://github.com/ibus/ibus/commit/d0a47c3 +Fixes: https://github.com/ibus/ibus/commit/a823161 + +BUG=https://github.com/ibus/ibus/pull/2549 +BUG=https://gitlab.gnome.org/GNOME/gtk/-/issues/3024#note_987835 +--- + client/gtk2/ibusimcontext.c | 141 +++++++++++++++--------------------- + 1 file changed, 58 insertions(+), 83 deletions(-) + +diff --git a/client/gtk2/ibusimcontext.c b/client/gtk2/ibusimcontext.c +index 7ccc129d..b5a44da0 100644 +--- a/client/gtk2/ibusimcontext.c ++++ b/client/gtk2/ibusimcontext.c +@@ -27,6 +27,7 @@ + + #include + #include ++#include + #include + #include + #include "ibusimcontext.h" +@@ -1612,8 +1613,13 @@ static gboolean + _set_cursor_location_internal (IBusIMContext *ibusimcontext) + { + GdkRectangle area; ++ GdkDisplay *display = NULL; + #if GTK_CHECK_VERSION (3, 98, 4) + GtkWidget *root; ++ GtkNative *native; ++ graphene_point_t p; ++ int tx = 0, ty = 0; ++ double nx = 0., ny = 0.; + #endif + + if(ibusimcontext->client_window == NULL || +@@ -1623,103 +1629,72 @@ _set_cursor_location_internal (IBusIMContext *ibusimcontext) + + area = ibusimcontext->cursor_area; + +-#ifdef GDK_WINDOWING_WAYLAND + #if GTK_CHECK_VERSION (3, 98, 4) + root = GTK_WIDGET (gtk_widget_get_root (ibusimcontext->client_window)); +- /* FIXME: GTK_STYLE_CLASS_TITLEBAR is available in GTK3 but not GTK4. +- * gtk_css_boxes_get_content_rect() is available in GTK4 but it's an +- * internal API and calculate the window edge 32 in GTK3. +- */ +- area.y += 32; +- area.width = 50; /* FIXME: Why 50 meets the cursor position? */ +- area.height = gtk_widget_get_height (root); +- area.height += 32; +- if (GDK_IS_WAYLAND_DISPLAY (gdk_display_get_default ())) { +- ibus_input_context_set_cursor_location_relative ( +- ibusimcontext->ibuscontext, +- area.x, +- area.y, +- area.width, +- area.height); +- return FALSE; +- } +-#else +- if (GDK_IS_WAYLAND_DISPLAY (gdk_display_get_default ())) { +- gdouble px, py; +- GdkWindow *parent; +- GdkWindow *window = ibusimcontext->client_window; +- +- while ((parent = gdk_window_get_effective_parent (window)) != NULL) { +- gdk_window_coords_to_parent (window, area.x, area.y, &px, &py); +- area.x = px; +- area.y = py; +- window = parent; +- } +- +- _set_rect_scale_factor_with_window (&area, +- ibusimcontext->client_window); +- ibus_input_context_set_cursor_location_relative ( +- ibusimcontext->ibuscontext, +- area.x, +- area.y, +- area.width, +- area.height); +- return FALSE; ++ /* Translates the given point in client_window coordinates to coordinates ++ relative to root coordinate system. */ ++ if (!gtk_widget_compute_point (ibusimcontext->client_window, ++ root, ++ &GRAPHENE_POINT_INIT (area.x, area.y), ++ &p)) { ++ graphene_point_init (&p, area.x, area.y); + } +-#endif +-#endif + +-#if GTK_CHECK_VERSION (3, 98, 4) +-#elif GTK_CHECK_VERSION (2, 91, 0) +- if (area.x == -1 && area.y == -1 && area.width == 0 && area.height == 0) { +- area.x = 0; +- area.y += gdk_window_get_height (ibusimcontext->client_window); +- } +-#else +- if (area.x == -1 && area.y == -1 && area.width == 0 && area.height == 0) { +- gint w, h; +- gdk_drawable_get_size (ibusimcontext->client_window, &w, &h); +- area.y += h; +- area.x = 0; +- } +-#endif ++ native = gtk_widget_get_native (ibusimcontext->client_window); ++ /* Translates from the surface coordinates into the widget coordinates. */ ++ gtk_native_get_surface_transform (native, &nx, &ny); + +-#if GTK_CHECK_VERSION (3, 98, 4) +-#if defined(GDK_WINDOWING_X11) +- GdkDisplay *display = gtk_widget_get_display (ibusimcontext->client_window); ++ display = gtk_widget_get_display (ibusimcontext->client_window); + if (GDK_IS_X11_DISPLAY (display)) { +- Display *xdisplay = gdk_x11_display_get_xdisplay (display); +- Window root_window = gdk_x11_display_get_xrootwindow (display); +- GtkNative *native = gtk_widget_get_native ( +- ibusimcontext->client_window); +- GdkSurface *surface = gtk_native_get_surface (native); +- /* The window is the toplevel window but not the inner text widget. +- * Unfortunatelly GTK4 cannot get the coordinate of the text widget. +- */ +- Window window = gdk_x11_surface_get_xid (surface); ++ GdkSurface *surface = gtk_native_get_surface ++ (gtk_widget_get_native (ibusimcontext->client_window)); + Window child; +- int x, y; +- XTranslateCoordinates (xdisplay, window, root_window, +- 0, 0, &x, &y, &child); +- XWindowAttributes xwa; +- XGetWindowAttributes (xdisplay, window, &xwa); +- area.x = x - xwa.x + area.x; +- area.y = y - xwa.y + area.y; +- area.width = 50; /* FIXME: Why 50 meets the cursor position? */ +- area.height = xwa.height; ++ int scale_factor = gtk_widget_get_scale_factor ++ (ibusimcontext->client_window); ++ ++ XTranslateCoordinates (GDK_DISPLAY_XDISPLAY (display), ++ GDK_SURFACE_XID (surface), ++ gdk_x11_display_get_xrootwindow (display), ++ 0, 0, &tx, &ty, ++ &child); ++ ++ tx = tx / scale_factor; ++ ty = ty / scale_factor; + } +-#endif ++ ++ area.x = p.x + nx + tx; ++ area.y = p.y + ny + ty; + #else + gdk_window_get_root_coords (ibusimcontext->client_window, + area.x, area.y, + &area.x, &area.y); + #endif ++ + _set_rect_scale_factor_with_window (&area, ibusimcontext->client_window); +- ibus_input_context_set_cursor_location (ibusimcontext->ibuscontext, +- area.x, +- area.y, +- area.width, +- area.height); ++ ++#ifdef GDK_WINDOWING_WAYLAND ++#if !GTK_CHECK_VERSION (3, 98, 4) ++ display = gdk_window_get_display (ibusimcontext->client_window); ++#endif ++ ++ if (GDK_IS_WAYLAND_DISPLAY (display)) { ++ ibus_input_context_set_cursor_location_relative (ibusimcontext->ibuscontext, ++ area.x, ++ area.y, ++ area.width, ++ area.height); ++ ++ } else { ++#endif ++ ibus_input_context_set_cursor_location (ibusimcontext->ibuscontext, ++ area.x, ++ area.y, ++ area.width, ++ area.height); ++#ifdef GDK_WINDOWING_WAYLAND ++ } ++#endif ++ + return FALSE; + } + +-- +2.41.0 + +From f176569cf774f87b23270257da68249dcda837c9 Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Wed, 18 Oct 2023 16:57:28 +0900 +Subject: [PATCH] src: Add DeleteSurroundingText to PostProcessKeyEvent + +DeleteSurroundingText also can be delayed sending to IBus clients. +Now surrounding D-Bus methods are added to PostProcessKeyEvent. + +Fixes: https://github.com/ibus/ibus/commit/38f09c6 + +BUG=https://github.com/ibus/ibus/issues/2570 +--- + bus/inputcontext.c | 33 +++++++++++++++++++++++++++++++-- + src/ibusinputcontext.c | 23 +++++++++++++++++++++++ + 2 files changed, 54 insertions(+), 2 deletions(-) + +diff --git a/bus/inputcontext.c b/bus/inputcontext.c +index aecc64f8..64430fe4 100644 +--- a/bus/inputcontext.c ++++ b/bus/inputcontext.c +@@ -2382,7 +2382,7 @@ _engine_forward_key_event_cb (BusEngineProxy *engine, + g_assert (context->queue_during_process_key_event); + + if (context->processing_key_event && g_queue_get_length ( +- context->queue_during_process_key_event) <= MAX_SYNC_DATA) { ++ context->queue_during_process_key_event) <= MAX_SYNC_DATA) { + SyncForwardingData *data; + IBusText *text = ibus_text_new_from_printf ("%u,%u,%u", + keyval, keycode, state); +@@ -2397,6 +2397,21 @@ _engine_delete_surrounding_text_cb (BusEngineProxy *engine, + + g_assert (context->engine == engine); + ++ if (context->processing_key_event && g_queue_get_length ( ++ context->queue_during_process_key_event) <= MAX_SYNC_DATA) { ++ SyncForwardingData *data; ++ IBusText *text = ibus_text_new_from_printf ("%d,%u", ++ offset_from_cursor, nchars); ++ if (g_queue_get_length (context->queue_during_process_key_event) ++ == MAX_SYNC_DATA) { ++ g_warning ("Exceed max number of sync process_key_event data"); ++ } ++ data = g_slice_new (SyncForwardingData); ++ data->key = 'd'; ++ data->text = g_object_ref (text); ++ g_queue_push_tail (context->queue_during_process_key_event, data); ++ return; ++ } + bus_input_context_emit_signal (context, + "DeleteSurroundingText", + g_variant_new ("(iu)", offset_from_cursor, nchars), +@@ -2442,6 +2457,20 @@ _engine_require_surrounding_text_cb (BusEngineProxy *engine, + + g_assert (context->engine == engine); + ++ if (context->processing_key_event && g_queue_get_length ( ++ context->queue_during_process_key_event) <= MAX_SYNC_DATA) { ++ SyncForwardingData *data; ++ IBusText *text = ibus_text_new_from_static_string (""); ++ if (g_queue_get_length (context->queue_during_process_key_event) ++ == MAX_SYNC_DATA) { ++ g_warning ("Exceed max number of post process_key_event data"); ++ } ++ data = g_slice_new (SyncForwardingData); ++ data->key = 'r'; ++ data->text = text; ++ g_queue_push_tail (context->queue_during_process_key_event, data); ++ return; ++ } + bus_input_context_emit_signal (context, + "RequireSurroundingText", + NULL, +@@ -3158,7 +3187,7 @@ bus_input_context_commit_text_use_extension (BusInputContext *context, + if (use_extension && context->emoji_extension) { + bus_panel_proxy_commit_text_received (context->emoji_extension, text); + } else if (context->processing_key_event && g_queue_get_length ( +- context->queue_during_process_key_event) <= MAX_SYNC_DATA) { ++ context->queue_during_process_key_event) <= MAX_SYNC_DATA) { + SyncForwardingData *data; + if (g_queue_get_length (context->queue_during_process_key_event) + == MAX_SYNC_DATA) { +diff --git a/src/ibusinputcontext.c b/src/ibusinputcontext.c +index def23b25..c6a030fe 100644 +--- a/src/ibusinputcontext.c ++++ b/src/ibusinputcontext.c +@@ -1406,6 +1406,7 @@ ibus_input_context_set_post_process_key_event (IBusInputContext *context, + void + ibus_input_context_post_process_key_event (IBusInputContext *context) + { ++ IBusInputContextPrivate *priv; + GVariant *cached_var_post; + gboolean enable = FALSE; + GVariant *result; +@@ -1418,6 +1419,7 @@ ibus_input_context_post_process_key_event (IBusInputContext *context) + + g_assert (IBUS_IS_INPUT_CONTEXT (context)); + ++ priv = IBUS_INPUT_CONTEXT_GET_PRIVATE (IBUS_INPUT_CONTEXT (context)); + cached_var_post = + g_dbus_proxy_get_cached_property ((GDBusProxy *)context, + "EffectivePostProcessKeyEvent"); +@@ -1479,6 +1481,25 @@ ibus_input_context_post_process_key_event (IBusInputContext *context) + state | IBUS_FORWARD_MASK); + break; + } ++ case 'r': { ++ priv->needs_surrounding_text = TRUE; ++ break; ++ } ++ case 'd': { ++ gchar **array = NULL; ++ gint offset_from_cursor; ++ guint nchars; ++ array = g_strsplit (text->text, ",", -1); ++ offset_from_cursor = g_ascii_strtoll (array[0], NULL, 10); ++ nchars = g_ascii_strtoull (array[1], NULL, 10); ++ g_strfreev (array); ++ g_signal_emit (context, ++ context_signals[DELETE_SURROUNDING_TEXT], ++ 0, ++ offset_from_cursor, ++ nchars); ++ break; ++ } + default: + g_warning ("%s: Type '%c' is not supported.", G_STRFUNC, type); + } +-- +2.41.0 + +From ef0d29d8bf4e533c428b2cd9d3ee9fa42e9e20e7 Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Wed, 25 Oct 2023 16:46:07 +0900 +Subject: [PATCH] src: Add preedit D-Bus signals to PostProcessKeyEvent + +ibus-hangul calls UpdatePreeditText signal during pressing Enter key +to hide the current preedit text and this also causes the reorder issue +in sync process-key-event and need to move the preedit signals +to PostProcessKeyEvent. + +Also refactor PostProcessKeyEvent codes. + +Fixes: https://github.com/ibus/ibus/commit/38f09c6 + +BUG=https://github.com/ibus/ibus/pull/2575 +--- + bus/inputcontext.c | 176 +++++++++++++++++++++++++++-------------- + src/ibusinputcontext.c | 162 +++++++++++++++++++++++++++++-------- + 2 files changed, 248 insertions(+), 90 deletions(-) + +diff --git a/bus/inputcontext.c b/bus/inputcontext.c +index 64430fe4..c914fbd2 100644 +--- a/bus/inputcontext.c ++++ b/bus/inputcontext.c +@@ -48,11 +48,25 @@ struct _SetEngineByDescData { + }; + typedef struct _SetEngineByDescData SetEngineByDescData; + ++typedef struct _DeleteSurroundingData { ++ gint offset; ++ guint nchars; ++} DeleteSurroundingData; ++ + typedef struct _SyncForwardingData { +- gchar key; +- IBusText *text; ++ char key; ++ IBusText *text; + } SyncForwardingData; + ++typedef struct _SyncForwardingPreData { ++ char key; ++ IBusText *text; ++ union { ++ guint uints[3]; ++ DeleteSurroundingData deleting; ++ } u; ++} SyncForwardingPreData; ++ + struct _BusInputContext { + IBusService parent; + +@@ -970,6 +984,7 @@ _ic_process_key_event (BusInputContext *context, + } + else { + g_dbus_method_invocation_return_value (invocation, g_variant_new ("(b)", FALSE)); ++ context->processing_key_event = FALSE; + } + } + +@@ -1654,6 +1670,71 @@ bus_input_context_service_set_property (IBusService *service, + } + + ++static gboolean ++bus_input_context_make_post_process_key_event (BusInputContext *context, ++ SyncForwardingPreData *pre_data) ++{ ++ SyncForwardingData *data; ++ if (context->processing_key_event && g_queue_get_length ( ++ context->queue_during_process_key_event) <= MAX_SYNC_DATA) { ++ if (g_queue_get_length (context->queue_during_process_key_event) ++ == MAX_SYNC_DATA) { ++ g_warning ("Exceed max number of post process_key_event data"); ++ } ++ data = g_slice_new (SyncForwardingData); ++ data->key = pre_data->key; ++ switch (pre_data->key) { ++ case 'c': ++ data->text = g_object_ref (pre_data->text); ++ break; ++ case 'd': ++ data->text = ibus_text_new_from_printf ( ++ "%d,%u", ++ pre_data->u.deleting.offset, ++ pre_data->u.deleting.nchars); ++ break; ++ case 'f': ++ data->text = ibus_text_new_from_printf ("%u,%u,%u", ++ pre_data->u.uints[0], ++ pre_data->u.uints[1], ++ pre_data->u.uints[2]); ++ break; ++ case 'h': ++ case 'r': ++ case 's': ++ data->text = ibus_text_new_from_static_string (""); ++ break; ++ case 'u': ++ case 'm': ++ data->text = g_object_ref (pre_data->text); ++ g_queue_push_tail (context->queue_during_process_key_event, data); ++ data = g_slice_new (SyncForwardingData); ++ data->key = pre_data->key; ++ if (pre_data->key == 'u') { ++ data->text = ibus_text_new_from_printf ( ++ "%u,%u", ++ pre_data->u.uints[0], ++ pre_data->u.uints[1]); ++ } else { ++ data->text = ibus_text_new_from_printf ( ++ "%u,%u,%u", ++ pre_data->u.uints[0], ++ pre_data->u.uints[1], ++ pre_data->u.uints[2]); ++ } ++ break; ++ default: ++ g_warning ("Type %c of SyncForwardingData is not supported", ++ pre_data->key); ++ g_slice_free (SyncForwardingData, data); ++ return FALSE; ++ } ++ g_queue_push_tail (context->queue_during_process_key_event, data); ++ return TRUE; ++ } ++ return FALSE; ++} ++ + gboolean + bus_input_context_has_focus (BusInputContext *context) + { +@@ -1893,6 +1974,9 @@ bus_input_context_show_preedit_text (BusInputContext *context, + } + + if (PREEDIT_CONDITION) { ++ SyncForwardingPreData pre_data = { 's', }; ++ if (bus_input_context_make_post_process_key_event (context, &pre_data)) ++ return; + bus_input_context_emit_signal (context, + "ShowPreeditText", + NULL, +@@ -1933,6 +2017,9 @@ bus_input_context_hide_preedit_text (BusInputContext *context, + } + + if (PREEDIT_CONDITION) { ++ SyncForwardingPreData pre_data = { 'h', }; ++ if (bus_input_context_make_post_process_key_event (context, &pre_data)) ++ return; + bus_input_context_emit_signal (context, + "HidePreeditText", + NULL, +@@ -2254,27 +2340,18 @@ _engine_forward_key_event_cb (BusEngineProxy *engine, + guint state, + BusInputContext *context) + { ++ SyncForwardingPreData pre_data = { 'f', }; ++ + g_assert (BUS_IS_ENGINE_PROXY (engine)); + g_assert (BUS_IS_INPUT_CONTEXT (context)); +- + g_assert (context->engine == engine); + g_assert (context->queue_during_process_key_event); + +- if (context->processing_key_event && g_queue_get_length ( +- context->queue_during_process_key_event) <= MAX_SYNC_DATA) { +- SyncForwardingData *data; +- IBusText *text = ibus_text_new_from_printf ("%u,%u,%u", +- keyval, keycode, state); +- if (g_queue_get_length (context->queue_during_process_key_event) +- == MAX_SYNC_DATA) { +- g_warning ("Exceed max number of post process_key_event data"); +- } +- data = g_slice_new (SyncForwardingData); +- data->key = 'f'; +- data->text = text; +- g_queue_push_tail (context->queue_during_process_key_event, data); ++ pre_data.u.uints[0] = keyval; ++ pre_data.u.uints[1] = keycode; ++ pre_data.u.uints[2] = state; ++ if (bus_input_context_make_post_process_key_event (context, &pre_data)) + return; +- } + bus_input_context_emit_signal (context, + "ForwardKeyEvent", + g_variant_new ("(uuu)", keyval, keycode, state), +@@ -2292,26 +2369,16 @@ _engine_delete_surrounding_text_cb (BusEngineProxy *engine, + guint nchars, + BusInputContext *context) + { ++ SyncForwardingPreData pre_data = { 'd', }; ++ + g_assert (BUS_IS_ENGINE_PROXY (engine)); + g_assert (BUS_IS_INPUT_CONTEXT (context)); +- + g_assert (context->engine == engine); + +- if (context->processing_key_event && g_queue_get_length ( +- context->queue_during_process_key_event) <= MAX_SYNC_DATA) { +- SyncForwardingData *data; +- IBusText *text = ibus_text_new_from_printf ("%d,%u", +- offset_from_cursor, nchars); +- if (g_queue_get_length (context->queue_during_process_key_event) +- == MAX_SYNC_DATA) { +- g_warning ("Exceed max number of sync process_key_event data"); +- } +- data = g_slice_new (SyncForwardingData); +- data->key = 'd'; +- data->text = g_object_ref (text); +- g_queue_push_tail (context->queue_during_process_key_event, data); ++ pre_data.u.deleting.offset = offset_from_cursor; ++ pre_data.u.deleting.nchars = nchars; ++ if (bus_input_context_make_post_process_key_event (context, &pre_data)) + return; +- } + bus_input_context_emit_signal (context, + "DeleteSurroundingText", + g_variant_new ("(iu)", offset_from_cursor, nchars), +@@ -2452,25 +2520,14 @@ static void + _engine_require_surrounding_text_cb (BusEngineProxy *engine, + BusInputContext *context) + { ++ SyncForwardingPreData pre_data = { 'r', }; ++ + g_assert (BUS_IS_ENGINE_PROXY (engine)); + g_assert (BUS_IS_INPUT_CONTEXT (context)); +- + g_assert (context->engine == engine); + +- if (context->processing_key_event && g_queue_get_length ( +- context->queue_during_process_key_event) <= MAX_SYNC_DATA) { +- SyncForwardingData *data; +- IBusText *text = ibus_text_new_from_static_string (""); +- if (g_queue_get_length (context->queue_during_process_key_event) +- == MAX_SYNC_DATA) { +- g_warning ("Exceed max number of post process_key_event data"); +- } +- data = g_slice_new (SyncForwardingData); +- data->key = 'r'; +- data->text = text; +- g_queue_push_tail (context->queue_during_process_key_event, data); ++ if (bus_input_context_make_post_process_key_event (context, &pre_data)) + return; +- } + bus_input_context_emit_signal (context, + "RequireSurroundingText", + NULL, +@@ -3178,6 +3235,8 @@ bus_input_context_commit_text_use_extension (BusInputContext *context, + IBusText *text, + gboolean use_extension) + { ++ SyncForwardingPreData pre_data = { 'c', text, }; ++ + g_assert (BUS_IS_INPUT_CONTEXT (context)); + g_assert (context->queue_during_process_key_event); + +@@ -3186,17 +3245,9 @@ bus_input_context_commit_text_use_extension (BusInputContext *context, + + if (use_extension && context->emoji_extension) { + bus_panel_proxy_commit_text_received (context->emoji_extension, text); +- } else if (context->processing_key_event && g_queue_get_length ( +- context->queue_during_process_key_event) <= MAX_SYNC_DATA) { +- SyncForwardingData *data; +- if (g_queue_get_length (context->queue_during_process_key_event) +- == MAX_SYNC_DATA) { +- g_warning ("Exceed max number of sync process_key_event data"); +- } +- data = g_slice_new (SyncForwardingData); +- data->key = 'c'; +- data->text = g_object_ref (text); +- g_queue_push_tail (context->queue_during_process_key_event, data); ++ } else if (bus_input_context_make_post_process_key_event (context, ++ &pre_data)) { ++ return; + } else { + GVariant *variant = ibus_serializable_serialize ( + (IBusSerializable *)text); +@@ -3245,9 +3296,18 @@ bus_input_context_update_preedit_text (BusInputContext *context, + context->preedit_cursor_pos, + context->preedit_visible); + } else if (PREEDIT_CONDITION) { ++ SyncForwardingPreData pre_data = { 'u', context->preedit_text, }; + GVariant *variant = ibus_serializable_serialize ( + (IBusSerializable *)context->preedit_text); +- if (context->client_commit_preedit) { ++ pre_data.u.uints[0] = context->preedit_cursor_pos; ++ pre_data.u.uints[1] = extension_visible ? 1 : 0; ++ pre_data.u.uints[2] = context->preedit_mode; ++ if (context->client_commit_preedit) ++ pre_data.key = 'm'; ++ if (bus_input_context_make_post_process_key_event (context, ++ &pre_data)) { ++ return; ++ } else if (context->client_commit_preedit) { + bus_input_context_emit_signal ( + context, + "UpdatePreeditTextWithMode", +diff --git a/src/ibusinputcontext.c b/src/ibusinputcontext.c +index c6a030fe..1b62f656 100644 +--- a/src/ibusinputcontext.c ++++ b/src/ibusinputcontext.c +@@ -1403,10 +1403,103 @@ ibus_input_context_set_post_process_key_event (IBusInputContext *context, + g_variant_unref (var_post); + } + ++ ++static void ++ibus_input_context_fwd_text_to_commit (IBusInputContext *context, ++ IBusText *text) ++{ ++ g_signal_emit (context, context_signals[COMMIT_TEXT], 0, text); ++} ++ ++ ++static void ++ibus_input_context_fwd_text_to_forward_key_event (IBusInputContext *context, ++ IBusText *text) ++{ ++ gchar **array = NULL; ++ guint keyval, keycode, state; ++ array = g_strsplit (text->text, ",", -1); ++ keyval = g_ascii_strtoull (array[0], NULL, 10); ++ keycode = g_ascii_strtoull (array[1], NULL, 10); ++ state = g_ascii_strtoull (array[2], NULL, 10); ++ g_strfreev (array); ++ g_signal_emit (context, ++ context_signals[FORWARD_KEY_EVENT], ++ 0, ++ keyval, ++ keycode, ++ state | IBUS_FORWARD_MASK); ++} ++ ++ ++static void ++ibus_input_context_fwd_text_to_require_surrounding (IBusInputContext *context, ++ IBusText *text) ++{ ++ IBusInputContextPrivate *priv; ++ g_assert (IBUS_IS_INPUT_CONTEXT (context)); ++ priv = IBUS_INPUT_CONTEXT_GET_PRIVATE (IBUS_INPUT_CONTEXT (context)); ++ priv->needs_surrounding_text = TRUE; ++} ++ ++ ++static void ++ibus_input_context_fwd_text_to_delete_surrounding (IBusInputContext *context, ++ IBusText *text) ++{ ++ gchar **array = NULL; ++ gint offset_from_cursor; ++ guint nchars; ++ array = g_strsplit (text->text, ",", -1); ++ offset_from_cursor = g_ascii_strtoll (array[0], NULL, 10); ++ nchars = g_ascii_strtoull (array[1], NULL, 10); ++ g_strfreev (array); ++ g_signal_emit (context, ++ context_signals[DELETE_SURROUNDING_TEXT], ++ 0, ++ offset_from_cursor, ++ nchars); ++} ++ ++ ++static void ++ibus_input_context_fwd_text_to_update_preedit (IBusInputContext *context, ++ IBusText *text, ++ IBusText *position, ++ char type) ++{ ++ gchar **array = NULL; ++ guint32 cursor_pos; ++ gboolean visible; ++ guint mode = 0; ++ ++ array = g_strsplit (position->text, ",", -1); ++ cursor_pos = g_ascii_strtoull (array[0], NULL, 10); ++ visible = g_ascii_strtoull (array[1], NULL, 10) ? TRUE : FALSE; ++ if (type == 'u') { ++ g_signal_emit (context, ++ context_signals[UPDATE_PREEDIT_TEXT], ++ 0, ++ text, ++ cursor_pos, ++ visible); ++ } else { ++ mode = g_ascii_strtoull (array[2], NULL, 10); ++ g_signal_emit (context, ++ context_signals[UPDATE_PREEDIT_TEXT_WITH_MODE], ++ 0, ++ text, ++ cursor_pos, ++ visible, ++ mode); ++ } ++ g_strfreev (array); ++} ++ ++ + void + ibus_input_context_post_process_key_event (IBusInputContext *context) + { +- IBusInputContextPrivate *priv; + GVariant *cached_var_post; + gboolean enable = FALSE; + GVariant *result; +@@ -1419,7 +1513,6 @@ ibus_input_context_post_process_key_event (IBusInputContext *context) + + g_assert (IBUS_IS_INPUT_CONTEXT (context)); + +- priv = IBUS_INPUT_CONTEXT_GET_PRIVATE (IBUS_INPUT_CONTEXT (context)); + cached_var_post = + g_dbus_proxy_get_cached_property ((GDBusProxy *)context, + "EffectivePostProcessKeyEvent"); +@@ -1454,7 +1547,7 @@ ibus_input_context_post_process_key_event (IBusInputContext *context) + g_assert (variant); + g_variant_iter_init (&iter, variant); + size = g_variant_iter_n_children (&iter); +- while (size >0 && g_variant_iter_loop (&iter, "(yv)", &type, &vtext)) { ++ while (size > 0 && g_variant_iter_loop (&iter, "(yv)", &type, &vtext)) { + IBusText *text = + (IBusText *)ibus_serializable_deserialize_object (vtext); + if (!IBUS_IS_TEXT (text)) { +@@ -1463,41 +1556,48 @@ ibus_input_context_post_process_key_event (IBusInputContext *context) + } + switch (type) { + case 'c': +- g_signal_emit (context, context_signals[COMMIT_TEXT], 0, text); ++ ibus_input_context_fwd_text_to_commit (context, text); + break; + case 'f': { +- gchar **array = NULL; +- guint keyval, keycode, state; +- array = g_strsplit (text->text, ",", -1); +- keyval = g_ascii_strtoull (array[0], NULL, 10); +- keycode = g_ascii_strtoull (array[1], NULL, 10); +- state = g_ascii_strtoull (array[2], NULL, 10); +- g_strfreev (array); +- g_signal_emit (context, +- context_signals[FORWARD_KEY_EVENT], +- 0, +- keyval, +- keycode, +- state | IBUS_FORWARD_MASK); ++ ibus_input_context_fwd_text_to_forward_key_event (context, text); + break; + } + case 'r': { +- priv->needs_surrounding_text = TRUE; ++ ibus_input_context_fwd_text_to_require_surrounding (context, text); + break; + } + case 'd': { +- gchar **array = NULL; +- gint offset_from_cursor; +- guint nchars; +- array = g_strsplit (text->text, ",", -1); +- offset_from_cursor = g_ascii_strtoll (array[0], NULL, 10); +- nchars = g_ascii_strtoull (array[1], NULL, 10); +- g_strfreev (array); +- g_signal_emit (context, +- context_signals[DELETE_SURROUNDING_TEXT], +- 0, +- offset_from_cursor, +- nchars); ++ ibus_input_context_fwd_text_to_delete_surrounding (context, text); ++ break; ++ } ++ case 'u': ++ case 'm': { ++ IBusText *position; ++ g_clear_pointer (&vtext, g_variant_unref); ++ if (!g_variant_iter_loop (&iter, "(yv)", &type, &vtext)) { ++ g_warning ("%s: %s", G_STRFUNC, ++ "Type 'u' requires next type 'u'"); ++ break; ++ } ++ if (type != 'u' && type != 'm') { ++ g_warning ("%s: %s", G_STRFUNC, ++ "The next of type 'u' should be type 'u'"); ++ break; ++ } ++ position = ++ (IBusText *)ibus_serializable_deserialize_object (vtext); ++ if (!IBUS_IS_TEXT (position)) { ++ g_warning ("%s: %s", G_STRFUNC, "text is not IBusText"); ++ break; ++ } ++ ibus_input_context_fwd_text_to_update_preedit (context, ++ text, ++ position, ++ type); ++ if (g_object_is_floating (position)) { ++ g_object_ref_sink (position); ++ g_object_unref (position); ++ } + break; + } + default: +-- +2.41.0 + +From 1be3e2f79b384a374b2a69a31c88a4f36e1dd868 Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Wed, 15 Nov 2023 17:19:02 +0900 +Subject: [PATCH] client/gtk2: Call strdup() after g_return_if_fail() + +--- + client/gtk2/ibusimcontext.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/client/gtk2/ibusimcontext.c b/client/gtk2/ibusimcontext.c +index b5a44da0..cfc08c20 100644 +--- a/client/gtk2/ibusimcontext.c ++++ b/client/gtk2/ibusimcontext.c +@@ -2417,7 +2417,7 @@ _create_input_context_done (IBusBus *bus, + static void + _create_input_context (IBusIMContext *ibusimcontext) + { +- gchar *prgname = g_strdup (g_get_prgname()); ++ gchar *prgname; + gchar *client_name; + IDEBUG ("%s", __FUNCTION__); + +@@ -2425,6 +2425,7 @@ _create_input_context (IBusIMContext *ibusimcontext) + + g_return_if_fail (ibusimcontext->cancellable == NULL); + ++ prgname = g_strdup (g_get_prgname()); + ibusimcontext->cancellable = g_cancellable_new (); + + if (!prgname) +-- +2.41.0 + diff --git a/SOURCES/ibus-HEAD.patch b/SOURCES/ibus-HEAD.patch new file mode 100644 index 0000000..df938c3 --- /dev/null +++ b/SOURCES/ibus-HEAD.patch @@ -0,0 +1,154 @@ +From 571e3b6e4f386abf12d3db70b9468e092c8d72bd Mon Sep 17 00:00:00 2001 +From: Alynx Zhou +Date: Tue, 24 Aug 2021 10:12:52 +0800 +Subject: [PATCH] client/gtk2/ibusimcontext: Fix wrong cursor location in gtk3 + apps + +If you apply this patch in your tarball, please also apply this to +client/gtk3/ibusimcontext.c besides client/gtk2/ibusimcontext.c . + +BUG=https://github.com/ibus/ibus/issues/2337 +--- + client/gtk2/ibusimcontext.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/client/gtk2/ibusimcontext.c b/client/gtk2/ibusimcontext.c +index da9a402f..b1ccede9 100644 +--- a/client/gtk2/ibusimcontext.c ++++ b/client/gtk2/ibusimcontext.c +@@ -1497,7 +1497,10 @@ _set_cursor_location_internal (IBusIMContext *ibusimcontext) + + #if GTK_CHECK_VERSION (3, 98, 4) + #elif GTK_CHECK_VERSION (2, 91, 0) +- area.y += gdk_window_get_height (ibusimcontext->client_window); ++ if (area.x == -1 && area.y == -1 && area.width == 0 && area.height == 0) { ++ area.x = 0; ++ area.y += gdk_window_get_height (ibusimcontext->client_window); ++ } + #else + if (area.x == -1 && area.y == -1 && area.width == 0 && area.height == 0) { + gint w, h; +-- +2.31.1 + +From 5487a6baa4b22605ba8197ca1a0fa43c91d57786 Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Mon, 6 Sep 2021 20:23:59 +0900 +Subject: [PATCH] client/gtk2/ibusimcontext: Implement clear preedit for GTK4 + +IBus IM module uses synchornized key processes for GTK4 and the timing +of the GTK reset siginal may work with focus-in/out between windows. +(I don't test GTK4 firefox and terminal yet and the verification is not +completed.) +So ibus_im_context_clear_preedit_text() is now called with the GTK4 reset +siginal. +ibus_im_context_clear_preedit_text() works with ibus-setup-anthy -> +"Conversion" tab -> "Behavior on Focus Out" pull down menu. + +BUG=https://github.com/ibus/ibus/issues/2334 +--- + client/gtk2/ibusimcontext.c | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/client/gtk2/ibusimcontext.c b/client/gtk2/ibusimcontext.c +index b1ccede9..e12be45d 100644 +--- a/client/gtk2/ibusimcontext.c ++++ b/client/gtk2/ibusimcontext.c +@@ -1270,6 +1270,8 @@ ibus_im_context_reset (GtkIMContext *context) + * IBus uses button-press-event instead until GTK is fixed. + * https://gitlab.gnome.org/GNOME/gtk/issues/1534 + */ ++ if (_use_sync_mode) ++ ibus_im_context_clear_preedit_text (ibusimcontext); + ibus_input_context_reset (ibusimcontext->ibuscontext); + } + gtk_im_context_reset (ibusimcontext->slave); +@@ -1383,7 +1385,7 @@ ibus_im_context_set_client_window (GtkIMContext *context, + + if (ibusimcontext->client_window) { + #if !GTK_CHECK_VERSION (3, 98, 4) +- if (ibusimcontext->use_button_press_event) ++ if (ibusimcontext->use_button_press_event && !_use_sync_mode) + _connect_button_press_event (ibusimcontext, FALSE); + #endif + g_object_unref (ibusimcontext->client_window); +@@ -1393,7 +1395,7 @@ ibus_im_context_set_client_window (GtkIMContext *context, + if (client != NULL) { + ibusimcontext->client_window = g_object_ref (client); + #if !GTK_CHECK_VERSION (3, 98, 4) +- if (!ibusimcontext->use_button_press_event) ++ if (!ibusimcontext->use_button_press_event && !_use_sync_mode) + _connect_button_press_event (ibusimcontext, TRUE); + #endif + } +@@ -1994,7 +1996,8 @@ _ibus_context_update_preedit_text_cb (IBusInputContext *ibuscontext, + + #if !GTK_CHECK_VERSION (3, 98, 4) + if (!ibusimcontext->use_button_press_event && +- mode == IBUS_ENGINE_PREEDIT_COMMIT) { ++ mode == IBUS_ENGINE_PREEDIT_COMMIT && ++ !_use_sync_mode) { + if (ibusimcontext->client_window) { + _connect_button_press_event (ibusimcontext, TRUE); + } +-- +2.28.0 + +From 4957d1468db4fc5ed30c3ae1f2afac9e51b329d6 Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Mon, 6 Sep 2021 20:25:52 +0900 +Subject: [PATCH] client/gtk2/ibusimcontext: Calculate keycode from keysym in + GTK3 forward-key-event + +IBus GTK3 mode also calculates keycode from keysym if keycode == 0 +with forward-key-event signal to follow GTK4. +--- + client/gtk2/ibusimcontext.c | 22 ++++++++++++++++++---- + 1 file changed, 18 insertions(+), 4 deletions(-) + +diff --git a/client/gtk2/ibusimcontext.c b/client/gtk2/ibusimcontext.c +index e12be45d..b1424e87 100644 +--- a/client/gtk2/ibusimcontext.c ++++ b/client/gtk2/ibusimcontext.c +@@ -1939,13 +1939,16 @@ _ibus_context_forward_key_event_cb (IBusInputContext *ibuscontext, + int group = 0; + g_return_if_fail (GTK_IS_IM_CONTEXT (ibusimcontext)); + if (keycode == 0 && ibusimcontext->client_window) { +- GdkDisplay *display = gtk_widget_get_display (ibusimcontext->client_window); ++ GdkDisplay *display = ++ gtk_widget_get_display (ibusimcontext->client_window); + GdkKeymapKey *keys = NULL; + gint n_keys = 0; +- if (!gdk_display_map_keyval (display, keyval, &keys, &n_keys)) ++ if (gdk_display_map_keyval (display, keyval, &keys, &n_keys)) { ++ keycode = keys->keycode; ++ group = keys->group; ++ } else { + g_warning ("Failed to parse keycode from keyval %x", keyval); +- keycode = keys->keycode; +- group = keys->group; ++ } + } + gtk_im_context_filter_key ( + GTK_IM_CONTEXT (ibusimcontext), +@@ -1957,6 +1960,17 @@ _ibus_context_forward_key_event_cb (IBusInputContext *ibuscontext, + (GdkModifierType)state, + group); + #else ++ if (keycode == 0 && ibusimcontext->client_window) { ++ GdkDisplay *display = ++ gdk_window_get_display (ibusimcontext->client_window); ++ GdkKeymap *keymap = gdk_keymap_get_for_display (display); ++ GdkKeymapKey *keys = NULL; ++ gint n_keys = 0; ++ if (gdk_keymap_get_entries_for_keyval (keymap, keyval, &keys, &n_keys)) ++ keycode = keys->keycode; ++ else ++ g_warning ("Failed to parse keycode from keyval %x", keyval); ++ } + GdkEventKey *event = _create_gdk_event (ibusimcontext, keyval, keycode, state); + gdk_event_put ((GdkEvent *)event); + gdk_event_free ((GdkEvent *)event); +-- +2.28.0 + diff --git a/SOURCES/ibus-xinput b/SOURCES/ibus-xinput new file mode 100644 index 0000000..4d7f457 --- /dev/null +++ b/SOURCES/ibus-xinput @@ -0,0 +1,18 @@ +XIM=ibus +XIM_PROGRAM="/usr/bin/ibus-daemon" +ICON="ibus" +XIM_ARGS="-r --xim" +PREFERENCE_PROGRAM=/usr/bin/ibus-setup +SHORT_DESC="IBus" +GTK_IM_MODULE=ibus +NOT_RUN=gnome3 + +if test -f /usr/lib64/qt5/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so || \ + test -f /usr/lib/qt5/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so || \ + test -f /usr/lib64/qt4/plugins/inputmethods/libqtim-ibus.so || \ + test -f /usr/lib/qt4/plugins/inputmethods/libqtim-ibus.so; +then + QT_IM_MODULE=ibus +else + QT_IM_MODULE=xim +fi diff --git a/SOURCES/ibus-xx-desktop-testing-mutter.patch b/SOURCES/ibus-xx-desktop-testing-mutter.patch new file mode 100644 index 0000000..5af6c79 --- /dev/null +++ b/SOURCES/ibus-xx-desktop-testing-mutter.patch @@ -0,0 +1,37 @@ +From d63da885f8f4e3764b8b572347b70a0cefadc335 Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Wed, 16 Jun 2021 20:55:20 +0900 +Subject: [PATCH] src/tests: Change window manager to mutter for RHEL + +--- + src/tests/ibus-desktop-testing-runner.in | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/tests/ibus-desktop-testing-runner.in b/src/tests/ibus-desktop-testing-runner.in +index 54b7e0d7..211e0da5 100755 +--- a/src/tests/ibus-desktop-testing-runner.in ++++ b/src/tests/ibus-desktop-testing-runner.in +@@ -44,7 +44,7 @@ TEST_LOG="test-suite.log" + TEST_LOG_STDOUT=0 + RESULT_LOG="" + HAVE_GRAPHICS=1 +-DESKTOP_COMMAND="dbus-launch --exit-with-session gnome-session" ++DESKTOP_COMMAND="dbus-launch --exit-with-session mutter" + PID_XORG=0 + PID_GNOME_SESSION=0 + TESTING_RUNNER="default" +@@ -80,9 +80,9 @@ usage() + "-b, --builddir=BUILDDIR Set the BUILDDIR\n" \ + "-s, --srcdir=SOURCEDIR Set the SOURCEDIR\n" \ + "-c, --no-graphics Use Xvfb instead of Xorg\n" \ +-"-d, --desktop=DESKTOP Run DESTKTOP. The default is gnome-session.\n" \ ++"-d, --desktop=DESKTOP Run DESTKTOP. The default is mutter.\n" \ + " Suffix '-with-dbus' can run DESKTOP with dbus session." \ +-" E.g. --desktop=mutter-with-dbus" \ ++" E.g. --desktop=gnome-session-with-dbus" \ + "-t, --tests=\"TESTS...\" Run TESTS programs which is separated by space\n" \ + "-r, --runner=RUNNER Run TESTS programs with a test RUNNER.\n" \ + " RUNNDER = gnome or default.\n" \ +-- +2.28.0 + diff --git a/SOURCES/ibus.conf.5 b/SOURCES/ibus.conf.5 new file mode 100644 index 0000000..c5795b3 --- /dev/null +++ b/SOURCES/ibus.conf.5 @@ -0,0 +1,73 @@ +.\" This file is distributed under the same license as the ibus +.\" package. +.\" Copyright (C) Takao Fujiwara , 2013. +.\" +.TH IBUS.CONF "5" "August 2013" "1.5.3" "User Commands" +.SH NAME +.B ibus.conf +\- X input preload/configuration file for ibus + +.SH SYNOPSIS +.B /etc/X11/xinit/xinput.d/ibus.conf + +.SH DESCRIPTION + +.PP +IBus is an Intelligent Input Bus. It is a new input framework for Linux +OS. It provides full featured and user friendly input method user +interface. It also may help developers to develop input method easily. + +.PP +.B ibus.conf +is a configuration file containing X input setting values to be read in +and set by /etc/X11/xinit/xinitrc\-common. +.I imsettings-switch(1) +is called from XDG auto\-start and invokes +xinitrc\-common. +.LP +If this file is the alias of +.I /etc/X11/xinit/xinputrc +for the system setting +or +.I [$XDG_CONFIG_HOME|$HOME/.config]/imsettings/xinputrc +for the user setting, the setting can be default. +.I im\-chooser(1) +can choose the user setting. +.LP +The configuration options are: +.TP +\fBXIM\fP +XIM name for XMODIFIERS +.TP +\fBXIM_PROGRAM\fP +XIM executable program name +.TP +\fBXIM_ARGS\fP +XIM arguments for XIM_PROGRAM +.TP +\fBSHORT_DESC\fP +XIM human readable name for +.I im\-chooser(1) +.TP +\fBICON\fP +icon file for +.I im\-chooser(1) +.TP +\fBPREFERENCE_PROGRAM\fP +XIM setup program for +.I im\-chooser(1) +.TP +\fBGTK_IM_MODULE\fP +IM environment valuable for GTK+ applications. +.TP +\fBQT_IM_MODULE\fP +IM environment valuable for QT applications. + +.SH BUGS +If you find a bug, please report it at http://code.google.com/p/ibus/issues/list + +.SH "SEE ALSO" +.BR ibus\-daemon (1) +.BR imsettings\-switch (1) +.BR im\-chooser (1) +.BR X (7) diff --git a/SPECS/ibus.spec b/SPECS/ibus.spec new file mode 100644 index 0000000..a5132f6 --- /dev/null +++ b/SPECS/ibus.spec @@ -0,0 +1,1880 @@ +# https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_3 +%if (0%{?fedora} > 29 || 0%{?rhel} > 7) +%global with_python2 0 +%else +%global with_python2 1 +%endif + +%global with_pkg_config %(pkg-config --version >/dev/null 2>&1 && echo -n "1" || echo -n "0") + +%global ibus_api_version 1.0 + +# for bytecompile in %%{_datadir}/ibus/setup +%global __python %{__python3} + +%if (0%{?fedora} > 33 || 0%{?rhel} > 8) +%bcond_without gtk4 +%else +%bcond_with gtk4 +%endif + +%if %with_pkg_config +%{!?gtk2_binary_version: %global gtk2_binary_version %(pkg-config --variable=gtk_binary_version gtk+-2.0)} +%{!?gtk3_binary_version: %global gtk3_binary_version %(pkg-config --variable=gtk_binary_version gtk+-3.0)} +%if %{with gtk4} +%{!?gtk4_binary_version: %global gtk4_binary_version %(pkg-config --variable=gtk_binary_version gtk4)} +%else +%{!?gtk4_binary_version: %global gtk4_binary_version ?.?.?} +%endif +%global glib_ver %([ -a %{_libdir}/pkgconfig/glib-2.0.pc ] && pkg-config --modversion glib-2.0 | cut -d. -f 1,2 || echo -n "999") +%else +%{!?gtk2_binary_version: %global gtk2_binary_version ?.?.?} +%{!?gtk3_binary_version: %global gtk3_binary_version ?.?.?} +%{!?gtk4_binary_version: %global gtk4_binary_version ?.?.?} +%global glib_ver 0 +%endif + +%global dbus_python_version 0.83.0 + +Name: ibus +Version: 1.5.25 +Release: 5%{?dist} +Summary: Intelligent Input Bus for Linux OS +License: LGPLv2+ +URL: https://github.com/ibus/%name/wiki +Source0: https://github.com/ibus/%name/releases/download/%{version}/%{name}-%{version}.tar.gz +Source1: %{name}-xinput +Source2: %{name}.conf.5 +# Patch0: %%{name}-HEAD.patch +Patch0: %{name}-HEAD.patch +# RHEL-1616 +Patch1: %{name}-1616-gtk4-sync.patch +# Under testing #1349148 #1385349 #1350291 #1406699 #1432252 #1601577 +Patch2: %{name}-1385349-segv-bus-proxy.patch +%if 0%{?fedora:0}%{?rhel:1} +# Use mutter window manager in RHEL CI +Patch3: %{name}-xx-desktop-testing-mutter.patch +%endif + +BuildRequires: gettext-devel +BuildRequires: libtool +# for gtkdoc-fixxref +BuildRequires: glib2-doc +BuildRequires: gtk2-devel +BuildRequires: gtk3-devel +%if %{with gtk4} +BuildRequires: gtk4-devel +%endif +BuildRequires: dbus-glib-devel +BuildRequires: dbus-python-devel >= %{dbus_python_version} +BuildRequires: desktop-file-utils +BuildRequires: gtk-doc +BuildRequires: dconf-devel +BuildRequires: dbus-x11 +BuildRequires: python3-devel +BuildRequires: python3-gobject +%if %with_python2 +# https://bugzilla.gnome.org/show_bug.cgi?id=759334 +# Need python2 for gsettings-schema-convert +BuildRequires: python2-devel +# for AM_GCONF_SOURCE_2 in configure.ac +BuildRequires: GConf2-devel +BuildRequires: intltool +%endif +BuildRequires: git +BuildRequires: vala +BuildRequires: iso-codes-devel +BuildRequires: libnotify-devel +BuildRequires: wayland-devel +BuildRequires: cldr-emoji-annotation +BuildRequires: unicode-emoji +BuildRequires: unicode-ucd +# for ibus-keypress +BuildRequires: libXtst-devel + +Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Requires: (%{name}-gtk2%{?_isa} = %{version}-%{release} if gtk2) +Requires: %{name}-gtk3%{?_isa} = %{version}-%{release} +Requires: %{name}-setup = %{version}-%{release} + +Requires: iso-codes +Requires: dconf +# rpmlint asks to delete librsvg2 +#Requires: librsvg2 +# Owner of %%python3_sitearch/gi/overrides +Requires: python3-gobject +# https://bugzilla.redhat.com/show_bug.cgi?id=1161871 +%{?__python3:Requires: %{__python3}} +# Owner of %%{_sysconfdir}/X11/xinit +Requires: xorg-x11-xinit +Requires: setxkbmap +%if (0%{?fedora} > 29 || 0%{?rhel} > 8) +%else +Requires: dbus-x11 +%endif + +Requires: desktop-file-utils +Requires(post): desktop-file-utils +Requires(postun): desktop-file-utils +Requires: dconf +Requires(postun): dconf +Requires(posttrans): dconf + +Requires: %{_sbindir}/alternatives +Requires(post): %{_sbindir}/alternatives +Requires(postun): %{_sbindir}/alternatives + +%global _xinputconf %{_sysconfdir}/X11/xinit/xinput.d/ibus.conf + +%description +IBus means Intelligent Input Bus. It is an input framework for Linux OS. + +%package libs +Summary: IBus libraries + +Requires: dbus >= 1.2.4 +Requires: glib2 >= %{glib_ver} +# Owner of %%{_libdir}/girepository-1.0 +Requires: gobject-introspection +%if (0%{?fedora} > 28 || 0%{?rhel} > 7) +%else +Conflicts: %{name}%{?_isa} < %{version} +%endif + +%description libs +This package contains the libraries for IBus + +%package gtk2 +Summary: IBus IM module for GTK2 +Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Requires: glib2 >= %{glib_ver} +Requires(post): glib2 >= %{glib_ver} +# Added for upgrade el6 to el7 +Provides: ibus-gtk = %{version}-%{release} +Obsoletes: ibus-gtk < %{version}-%{release} + +%description gtk2 +This package contains IBus IM module for GTK2 + +%package gtk3 +Summary: IBus IM module for GTK3 +Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Requires: glib2 >= %{glib_ver} +Requires(post): glib2 >= %{glib_ver} + +%description gtk3 +This package contains IBus IM module for GTK3 + +%if %{with gtk4} +%package gtk4 +Summary: IBus IM module for GTK4 +Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Requires: glib2 >= %{glib_ver} +Requires(post): glib2 >= %{glib_ver} + +%description gtk4 +This package contains IBus IM module for GTK4 +%endif + +%package setup +Summary: IBus setup utility +Requires: %{name} = %{version}-%{release} +%{?__python3:Requires: %{__python3}} +Requires: python3-gobject +BuildRequires: gobject-introspection-devel +BuildRequires: pygobject3-devel +BuildRequires: make +BuildArch: noarch + +%description setup +This is a setup utility for IBus. + +%if %with_python2 +%package pygtk2 +Summary: IBus PyGTK2 library +%if (0%{?fedora} && 0%{?fedora} <= 27) || (0%{?rhel} && 0%{?rhel} <= 7) +Requires: dbus-python >= %{dbus_python_version} +%else +Requires: python2-dbus >= %{dbus_python_version} +%endif +Requires: python2 +Requires: pygtk2 +BuildArch: noarch + +%description pygtk2 +This is a PyGTK2 library for IBus. Now major IBus engines use PyGObject3 +and this package will be deprecated. +%endif + +%package py2override +Summary: IBus Python2 override library +Requires: %{name}-libs%{?_isa} = %{version}-%{release} +# Owner of %%python2_sitearch/gi/overrides +%if (0%{?fedora} && 0%{?fedora} <= 27) || (0%{?rhel} && 0%{?rhel} <= 7) +Requires: pygobject3-base +%else +Requires: python2-gobject-base +%endif +Requires: python2 + +%description py2override +This is a Python2 override library for IBus. The Python files override +some functions in GObject-Introspection. + +%package wayland +Summary: IBus IM module for Wayland +Requires: %{name}-libs%{?_isa} = %{version}-%{release} + +%description wayland +This package contains IBus IM module for Wayland + +%package devel +Summary: Development tools for ibus +Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Requires: dbus-devel +Requires: glib2-devel +# for %%{_datadir}/gettext/its +Requires: gettext + +%description devel +The ibus-devel package contains the header files and developer +docs for ibus. + +%package devel-docs +Summary: Developer documents for IBus +BuildArch: noarch + +%description devel-docs +The ibus-devel-docs package contains developer documentation for IBus + +%package desktop-testing +Summary: Wrapper of InstalledTests Runner for IBus +Requires: %{name} = %{version}-%{release} +%if 0%{?fedora:1}%{?rhel:0} +# Use no-overview mode in CI to get input focus +BuildRequires: gnome-shell-extension-no-overview +Requires: gnome-shell-extension-no-overview +%endif +BuildArch: noarch + +%description desktop-testing +GNOME desktop testing runner implements the InstalledTests specification +and IBus also needs focus events to enable input contexts on text widgets. +The wrapper script runs gnome-session for the focus events and GNOME +desktop testing runner internally. + +%package tests +Summary: Tests for the %{name} package +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}-libs%{?_isa} = %{version}-%{release} + +%description tests +The %{name}-tests package contains tests that can be used to verify +the functionality of the installed %{name} package. + + +%prep +%autosetup -S git +# cp client/gtk2/ibusimcontext.c client/gtk3/ibusimcontext.c || : +# cp client/gtk2/ibusim.c client/gtk3/ibusim.c || : +# cp client/gtk2/ibusimcontext.c client/gtk4/ibusimcontext.c || : +cp client/gtk2/ibusimcontext.c client/gtk3/ibusimcontext.c || : +cp client/gtk2/ibusimcontext.c client/gtk4/ibusimcontext.c || : + + +# prep test +for f in ibusimcontext.c ibusim.c +do + diff client/gtk2/$f client/gtk3/$f + if test $? -ne 0 ; then + echo "Have to copy $f into client/gtk3" + abort + fi +done +diff client/gtk2/ibusimcontext.c client/gtk4/ibusimcontext.c +if test $? -ne 0 ; then + echo "Have to copy ibusimcontext.c into client/gtk4" + abort +fi + +%build +#autoreconf -f -i -v +#make -C ui/gtk3 maintainer-clean-generic +#make -C tools maintainer-clean-generic +autoreconf -f -i -v +%configure \ + --disable-static \ + --enable-gtk2 \ + --enable-gtk3 \ +%if %{with gtk4} + --enable-gtk4 \ +%endif + --enable-xim \ + --enable-gtk-doc \ + --enable-surrounding-text \ + --with-python=python3 \ +%if ! %with_python2 + --disable-python2 \ +%else + --enable-python-library \ +%endif + --enable-wayland \ + --enable-introspection \ + --enable-install-tests \ + %{nil} + +%make_build + +%install +make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p' +rm -f $RPM_BUILD_ROOT%{_libdir}/libibus-*%{ibus_api_version}.la +rm -f $RPM_BUILD_ROOT%{_libdir}/gtk-2.0/%{gtk2_binary_version}/immodules/im-ibus.la +rm -f $RPM_BUILD_ROOT%{_libdir}/gtk-3.0/%{gtk3_binary_version}/immodules/im-ibus.la +%if %{with gtk4} +rm -f $RPM_BUILD_ROOT%{_libdir}/gtk-4.0/%{gtk4_binary_version}/immodules/libim-ibus.la +%endif + +# install man page +for S in %{SOURCE2} +do + cp $S . + MP=`basename $S` + gzip $MP + install -pm 644 -D ${MP}.gz $RPM_BUILD_ROOT%{_datadir}/man/man5/${MP}.gz +done + +# install xinput config file +install -pm 644 -D %{SOURCE1} $RPM_BUILD_ROOT%{_xinputconf} + +# install .desktop files +%if %with_python2 +echo "NoDisplay=true" >> $RPM_BUILD_ROOT%{_datadir}/applications/ibus-setup.desktop +%else +echo "NoDisplay=true" >> $RPM_BUILD_ROOT%{_datadir}/applications/org.freedesktop.IBus.Setup.desktop +%endif +#echo "X-GNOME-Autostart-enabled=false" >> $RPM_BUILD_ROOT%%{_sysconfdir}/xdg/autostart/ibus.desktop + +HAS_PREFIX=$(grep prefix $RPM_BUILD_ROOT%{_bindir}/ibus-setup | wc -l) +[ x"$HAS_PREFIX" == x1 ] && \ + sed -i -e '/prefix/d' $RPM_BUILD_ROOT%{_bindir}/ibus-setup + +desktop-file-install --delete-original \ + --dir $RPM_BUILD_ROOT%{_datadir}/applications \ + $RPM_BUILD_ROOT%{_datadir}/applications/* + +# FIXME: no version number +%find_lang %{name}10 + +%check +make check \ + DISABLE_GUI_TESTS="ibus-compose ibus-keypress test-stress" \ + VERBOSE=1 \ + %{nil} + +%post +%{_sbindir}/alternatives --install %{_sysconfdir}/X11/xinit/xinputrc xinputrc %{_xinputconf} 83 || : + +%postun +if [ "$1" -eq 0 ]; then + %{_sbindir}/alternatives --remove xinputrc %{_xinputconf} || : + # if alternative was set to manual, reset to auto + [ -L %{_sysconfdir}/alternatives/xinputrc -a "`readlink %{_sysconfdir}/alternatives/xinputrc`" = "%{_xinputconf}" ] && %{_sbindir}/alternatives --auto xinputrc || : + + # 'dconf update' sometimes does not update the db... + dconf update || : + [ -f %{_sysconfdir}/dconf/db/ibus ] && \ + rm %{_sysconfdir}/dconf/db/ibus || : + # 'ibus write-cache --system' updates the system cache. + [ -f /var/cache/ibus/bus/registry ] && \ + rm /var/cache/ibus/bus/registry || : +fi + +%posttrans +dconf update || : + +%transfiletriggerin -- %{_datadir}/ibus/component +[ -x %{_bindir}/ibus ] && \ + %{_bindir}/ibus write-cache --system &>/dev/null || : + +%transfiletriggerpostun -- %{_datadir}/ibus/component +[ -x %{_bindir}/ibus ] && \ + %{_bindir}/ibus write-cache --system &>/dev/null || : + + +%ldconfig_scriptlets libs + +%files -f %{name}10.lang +# FIXME: no version number +%doc AUTHORS COPYING README +%dir %{_datadir}/ibus/ +%{_bindir}/ibus +%{_bindir}/ibus-daemon +%{_datadir}/applications/org.freedesktop.IBus.Panel.Emojier.desktop +%{_datadir}/applications/org.freedesktop.IBus.Panel.Extension.Gtk3.desktop +%{_datadir}/bash-completion/completions/ibus.bash +%{_datadir}/dbus-1/services/*.service +%{_datadir}/GConf/gsettings/* +%{_datadir}/glib-2.0/schemas/*.xml +%{_datadir}/ibus/component +%{_datadir}/ibus/dicts +%{_datadir}/ibus/engine +%{_datadir}/ibus/keymaps +%{_datadir}/icons/hicolor/*/apps/* +%{_datadir}/man/man1/ibus.1.gz +%{_datadir}/man/man1/ibus-daemon.1.gz +%{_datadir}/man/man7/ibus-emoji.7.gz +%{_datadir}/man/man5/00-upstream-settings.5.gz +%{_datadir}/man/man5/ibus.5.gz +%{_datadir}/man/man5/ibus.conf.5.gz +%{_libexecdir}/ibus-engine-simple +%{_libexecdir}/ibus-dconf +%{_libexecdir}/ibus-portal +%{_libexecdir}/ibus-extension-gtk3 +%{_libexecdir}/ibus-ui-emojier +%{_libexecdir}/ibus-ui-gtk3 +%{_libexecdir}/ibus-x11 +%{_sysconfdir}/dconf/db/ibus.d +%{_sysconfdir}/dconf/profile/ibus +%python3_sitearch/gi/overrides/__pycache__/*.py* +%python3_sitearch/gi/overrides/IBus.py +# ibus owns xinput.d because gnome does not like to depend on imsettings. +%dir %{_sysconfdir}/X11/xinit/xinput.d +# Do not use %%config(noreplace) to always get the new keywords in _xinputconf +# For user customization, $HOME/.xinputrc can be used instead. +%config %{_xinputconf} + +%files libs +%{_libdir}/libibus-*%{ibus_api_version}.so.* +%dir %{_libdir}/girepository-1.0 +%{_libdir}/girepository-1.0/IBus*-1.0.typelib + +%files gtk2 +%{_libdir}/gtk-2.0/%{gtk2_binary_version}/immodules/im-ibus.so + +%files gtk3 +%{_libdir}/gtk-3.0/%{gtk3_binary_version}/immodules/im-ibus.so + +%if %{with gtk4} +%files gtk4 +%{_libdir}/gtk-4.0/%{gtk4_binary_version}/immodules/libim-ibus.so +%endif + +# The setup package won't include icon files so that +# gtk-update-icon-cache is executed in the main package only one time. +%files setup +%{_bindir}/ibus-setup +%if %with_python2 +%{_datadir}/applications/ibus-setup.desktop +%else +%{_datadir}/applications/org.freedesktop.IBus.Setup.desktop +%endif +%{_datadir}/ibus/setup +%{_datadir}/man/man1/ibus-setup.1.gz + +%if %with_python2 +%files pygtk2 +%dir %{python2_sitelib}/ibus +%{python2_sitelib}/ibus/* +%endif + +%if %with_python2 +%files py2override +%python2_sitearch/gi/overrides/IBus.py* +%endif + +%files wayland +%{_libexecdir}/ibus-wayland + +%files devel +%{_libdir}/lib*.so +%{_libdir}/pkgconfig/* +%{_includedir}/* +%{_datadir}/gettext/its/ibus.* +%dir %{_datadir}/gir-1.0 +%{_datadir}/gir-1.0/IBus*-1.0.gir +%dir %{_datadir}/vala +%dir %{_datadir}/vala/vapi +%{_datadir}/vala/vapi/ibus-*1.0.vapi +%{_datadir}/vala/vapi/ibus-*1.0.deps + +%files devel-docs +# Own html dir since gtk-doc is heavy. +%dir %{_datadir}/gtk-doc +%dir %{_datadir}/gtk-doc/html +%{_datadir}/gtk-doc/html/* + +%files desktop-testing +%{_bindir}/ibus-desktop-testing-runner + +%files tests +%dir %{_libexecdir}/installed-tests +%{_libexecdir}/installed-tests/ibus +%dir %{_datadir}/installed-tests +%{_datadir}/installed-tests/ibus + +%changelog +* Thu Mar 28 2024 MSVSphere Packaging Team - 1.5.25-5 +- Rebuilt for MSVSphere 9.4 beta + +* Wed Nov 15 2023 Takao Fujiwara - 1.5.25-5 +- Resolves: RHEL-1616 Fix RESOURCE_LEAK in OpenScanHub + +* Mon Oct 30 2023 Takao Fujiwara - 1.5.25-4 +- Resolves: RHEL-1616 Make ibus-tests to depend on ibus-libs + +* Tue Oct 24 2023 Takao Fujiwara - 1.5.25-3 +- Resolves: RHEL-1616 Space, back-spc, enter key not working on gtk4 + +* Mon Oct 04 2021 Takao Fujiwara - 1.5.25-2 +- Fix wrong cursor location in gtk3. Related: rhbz#2008359 + +* Fri Aug 20 2021 Takao Fujiwara - 1.5.25-1 +- Bump to 1.5.25. Related: rhbz#1995528 + +* Mon Aug 09 2021 Mohan Boddu - 1.5.24-8 +- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags + Related: rhbz#1991688 + +* Tue Jun 22 2021 Takao Fujiwara - 1.5.24-7 +- Use transfiletriggerin for ibus write-cache. Related: rhbz#1963071 +- Add gating.yaml + +* Wed May 26 2021 Takao Fujiwara - 1.5.24-6 +- Fix minor covscan reviews. Related: rhbz#1963071 + +* Fri May 21 2021 Takao Fujiwara - 1.5.24-5 +- Fix covscan reviews. Related: rhbz#1963071 + +- Implement ibus_im_context_set_surrounding_with_selection() + +* Fri Apr 16 2021 Mohan Boddu - 1.5.24-4 +- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 + +* Sat Mar 20 2021 Takao Fujiwara - 1.5.24-3 +- Don't output FAIL if the actual failure is 0 for Fedora CI + +* Sat Mar 20 2021 Takao Fujiwara - 1.5.24-2 +- Change default session to mutter from gnome in desktop-testing + +* Mon Feb 22 2021 Takao Fujiwara - 1.5.24-1 +- Bump to 1.5.24 + +* Tue Jan 26 2021 Fedora Release Engineering - 1.5.23-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Jan 20 2021 Takao Fujiwara - 1.5.23-3 +- Enable IM gtk4 module +- Fix to rename xkb:de::ger to sync xkeyboard-config +- Enhance ibus-setup search engine + +* Fri Nov 20 2020 Takao Fujiwara - 1.5.23-2 +- Bug 1898065 - Fix build failure of emoji-*.dict with CLDR 38 +- Fix build failure with Vala 0.50 +- Add IBUS_INPUT_PURPOSE_TERMINAL + +* Tue Sep 29 2020 Takao Fujiwara - 1.5.23-1 +- Bump to 1.5.23 + +* Tue Sep 15 2020 Takao Fujiwara - 1.5.22-17 +- Update po files + +* Wed Sep 09 2020 Takao Fujiwara - 1.5.22-16 +- Bug 1876877 - Fix to pull the correct language with no iso639 variants +- Accept xdigits only for Unicode typing + +* Thu Aug 27 2020 Takao Fujiwara - 1.5.22-15 +- Rename simple.xml to simple.xml.in + +* Thu Aug 27 2020 Takao Fujiwara - 1.5.22-14 +- Update ibusunicodegen.h with latest unicode-ucd +- Update simple.xml with latest xkeyboard-config +- Fix gvfsd-fuse to unbind directory +- Update translations + +* Fri Aug 21 2020 Takao Fujiwara - 1.5.22-13 +- Update simple.xml with layout_variant + +* Fri Aug 21 2020 Takao Fujiwara - 1.5.22-12 +- Generate simple.xml with denylist +- Tell Pango about the engine language in the candidate panel +- Add file list in registry file for Silverblue + +* Tue Jul 28 2020 Adam Jackson - 1.5.22-11 +- Require setxkbmap not xorg-x11-xkb-utils + +* Tue Jul 28 2020 Takao Fujiwara - 1.5.22-10 +- Delete _python_bytecompile_extra +- Update CI from ibus-typing-booster + +* Tue Jul 28 2020 Fedora Release Engineering - 1.5.22-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue May 26 2020 Miro Hrončok - 1.5.22-8 +- Rebuilt for Python 3.9 + +* Fri May 15 2020 Takao Fujiwara - 1.5.22-7 +- Resolves #1797726 bus_engine_proxy_new_internal() SIGTRAP + +* Fri May 15 2020 Takao Fujiwara - 1.5.22-6 +- Update HEAD.patch to make parallel dict build +- Update 1385349-segv-bus-proxy.patch +- Resolves #1767976 #1601577 #1771238 #1797120 + +* Wed Apr 22 2020 Takao Fujiwara - 1.5.22-5 +- Update ibus-desktop-testing-runner for su command + +* Wed Mar 11 2020 Adam Williamson - 1.5.22-4 +- Update #2195 patch backport (it was revised upstream) + +* Wed Mar 11 2020 Adam Williamson - 1.5.22-3 +- Backport PR #2195 to fix ibus with GNOME 3.36.0 + +* Tue Feb 25 2020 Takao Fujiwara - 1.5.22-2 +- Bug 1805634 - Add a conditional requires ibus-gtk2 with gtk2 + +* Thu Feb 13 2020 Takao Fujiwara - 1.5.22-1 +- Bump to 1.5.22 +- Delete package depending ibus-gtk2 + +* Thu Feb 13 2020 Takao Fujiwara - 1.5.21-9 +- Bug 1785276 - Fix abrt without XDG_CACHE_HOME/ibus +- Bug 1788754 - Fix abrt with NULL output of compose keys +- Bug 1787732 - Fix abrt in exit handlers in ibus-x11 +- Bug 1795499 - Fix abrt in bus monitor handlers when ibus-daemon restarts +- Fix greek cases +- Increase sleep 3 to wait for running ibus-config in CI. + +* Wed Jan 29 2020 Fedora Release Engineering - 1.5.21-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Dec 26 2019 Takao Fujiwara - 1.5.21-7 +- Revise the previous Hangul patch + +* Tue Dec 24 2019 Takao Fujiwara - 1.5.21-6 +- Fix to connect button-press-event for Hangul +- Delete a previous workaround targeted to firefox only for Hangul + +* Wed Dec 11 2019 Takao Fujiwara - 1.5.21-5 +- Add RHEL code reviews +- Fix Hangul preedit with mouse click + +* Mon Nov 18 2019 Takao Fujiwara - 1.5.21-4 +- Replace push with cd for Posix SH +- Use XDG_CONFIG_HOME for Unix socket directory +- Fix deprecated APIs +- Fix restart crash with inotify read() +- Fix Bug 1658187 exit `ibus emoji` with Escape key +- Add fr(bepo_afnor) keymap +- Add file list in registry file for Silverblue + +* Fri Oct 04 2019 Takao Fujiwara - 1.5.21-3 +- Fix to allocate compose output buffer with more than two chars + +* Fri Sep 13 2019 Takao Fujiwara - 1.5.21-2 +- Fix #1751940 - CVE-2019-14822 GDBusServer peer authorization + +* Fri Aug 23 2019 Takao Fujiwara - 1.5.21-1 +- Bump to 1.5.21 + +* Mon Aug 19 2019 Miro Hrončok - 1.5.20-11 +- Rebuilt for Python 3.8 + +* Tue Aug 13 2019 Takao Fujiwara - 1.5.20-10 +- Update ibus-desktop-testing-runner not to fail CI. + +* Tue Aug 06 2019 Takao Fujiwara - 1.5.20-9 +- ibus-daemon always will exits with parent's death. + +* Wed Jul 31 2019 Takao Fujiwara - 1.5.20-8 +- Fix a wrong result in direct testing instead of GNOME desktop testing + +* Mon Jul 29 2019 Takao Fujiwara - 1.5.20-7 +- Add CI + +* Fri Jul 26 2019 Takao Fujiwara - 1.5.20-6 +- Update ibus-HEAD.patch from upstream + Integrate a new compose feature + Generate ibus-tests and ibus-desktop-testing sub packages + +* Thu Jul 25 2019 Fedora Release Engineering - 1.5.20-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Mon May 13 2019 Takao Fujiwara - 1.5.20-4 +- Keep preedit cursor_pos and visible in clearing preedit text for Hangul + +* Tue Apr 23 2019 Takao Fujiwara - 1.5.20-3 +- Fix i18n ibus-setup +- Provide ibus.its + +* Tue Apr 16 2019 Takao Fujiwara - 1.5.20-2 +- Rebuilt for unicode-ucd- 12.0.0 + +* Thu Feb 28 2019 Takao Fujiwara - 1.5.20-1 +- Bumped to 1.5.20 + +* Thu Feb 28 2019 Pete Walter - 1.5.19-18 +- Update wayland deps + +* Fri Feb 22 2019 Takao Fujiwara - 1.5.19-17 +- Delete dconf dependencies and gettext migration for gschema.xml file +- Delete Super-space notification in initial login in non-GNOME desktops + +* Tue Feb 05 2019 Takao Fujiwara - 1.5.19-16 +- Resolves: #1671286 wrong mutex + +* Mon Feb 04 2019 Kalev Lember - 1.5.19-15 +- Update BRs for vala packaging changes +- Co-own vala and gir directories + +* Fri Feb 01 2019 Fedora Release Engineering - 1.5.19-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Tue Jan 29 2019 Takao Fujiwara - 1.5.19-13 +- Resolves: #1470673 Replace assert with warning for .XCompose +- Update APIs for Hangul preedit in Flatpak +- Fix Atom and Slack for Flatpak +- Resolves: #1663528 Check if the mutex is not unlocked before the clear + +* Thu Dec 20 2018 Takao Fujiwara - 1.5.19-12 +- Use ISO 639-3 names instead of 639 +- Connect to button-press-event only with IBUS_ENGINE_PREEDIT_COMMIT + +* Wed Dec 12 2018 Takao Fujiwara - 1.5.19-11 +- Fix SEGV on mouse clicks when ibus-daemon not running + +* Mon Dec 10 2018 Takao Fujiwara - 1.5.19-10 +- Always reset and clear preedit on mouse click +- Show compose preedit with custom compose file +- Clear preedit in IBusEngineSimple with focus changes +- Obsolete ibus-xkbc since Fedora 30 + +* Thu Nov 15 2018 Takao Fujiwara - 1.5.19-9 +- Detect mouse click to commit Hangul preedit +- Do not delete IBUS_CAP_SURROUNDING_TEXT + +* Tue Nov 06 2018 Takao Fujiwara - 1.5.19-8 +- Reverted noarch for devel-docs by mistake + +* Wed Oct 31 2018 Takao Fujiwara - 1.5.19-7 +- RHEL code reviews + +* Fri Oct 26 2018 Takao Fujiwara - 1.5.19-6 +- dbus-x11 is not required in Fedora 30 +- Add Conflicts for Fedora 28 + +* Tue Oct 23 2018 Takao Fujiwara - 1.5.19-5 +- Use __python3 instead of python3 +- Delete Requires ibus in ibus-gtk* for Flatpak + +* Fri Sep 14 2018 Takao Fujiwara - 1.5.19-4 +- Fix Bug SEGV Choose an emoji by mouse from the emoji category list + +* Thu Aug 30 2018 Takao Fujiwara - 1.5.19-3 +- Fix Bug 1618682 - SEGV with ASCII on emojier in Wayland +- Support Shift-Space on emojier preedit +- Do not move Emojier popup with the active candidate in Xorg + +* Wed Aug 22 2018 Takao Fujiwara - 1.5.19-2 +- Do not clear Unicode data when emoji annotation lang is changed + +* Wed Aug 08 2018 Takao Fujiwara - 1.5.19-1 +- Bumped to 1.5.19 + +* Mon Aug 06 2018 Takao Fujiwara - 1.5.18-14 +- Fixed Man page scan results for ibus +- Added IBUS_DISCARD_PASSWORD env variable for password dialog in firefox +- Added history annotation for previous emojis + +* Tue Jul 24 2018 Takao Fujiwara - 1.5.18-13 +- Deleted deprecated g_mem_* APIs + +* Mon Jul 23 2018 Takao Fujiwara - 1.5.18-12 +- Rebuilt with RHEL code reviews + +* Fri Jul 13 2018 Fedora Release Engineering - 1.5.18-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Mon Jul 02 2018 Miro Hrončok - 1.5.18-10 +- Rebuilt for Python 3.7 + +* Fri Jun 29 2018 Takao Fujiwara - 1.5.18-9 +- Do not use combined characters on preedit for compose keys +- Fixed an infinite loop of extension preedit with xterm + +* Wed Jun 27 2018 Takao Fujiwara - 1.5.18-8 +- Enable preedit for compose keys +- Fix SEGV in panel_binding_parse_accelerator + +* Wed Jun 20 2018 Takao Fujiwara - 1.5.18-7 +- Moved input focus on Emojier to engines' preedit +- Removed ibus-xx-emoji-harfbuzz.patch not to change session emoji font + +* Tue Jun 19 2018 Miro Hrončok - 1.5.18-6 +- Rebuilt for Python 3.7 + +* Mon May 07 2018 Takao Fujiwara - 1.5.18-5 +- Disabled python2 since RHEL8 +- Run make check in %%check except for GUI testings +- Fixed Bug 1574855 - [abrt] ibus: ibus_engine_filter_key_event() + +* Fri Mar 30 2018 Takao Fujiwara - 1.5.18-4 +- Fixed Bug 1554714 - improve order of unicode matches + +* Thu Mar 15 2018 Takao Fujiwara - 1.5.18-3 +- Fixed Bug 1554813 - Enter key on numpad in Emojier + +* Fri Mar 09 2018 Takao Fujiwara - 1.5.18-2 +- Rebuilt for cldr-emoji-annotation-32.90.0_1 and unicode-emoji-10.90.20180207 + +* Fri Mar 02 2018 Takao Fujiwara - 1.5.18-1 +- Bumped to 1.5.18 + +* Wed Feb 28 2018 Iryna Shcherbina - 1.5.17-11 +- Update Python 2 dependency declarations to new packaging standards + (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) + +* Tue Feb 27 2018 Takao Fujiwara - 1.5.17-10 +- Disabled panel extension for gdm user +- Enabled panel extension in Wayland + +* Wed Feb 21 2018 Takao Fujiwara - 1.5.17-9 +- Added panel extension for emoji keybinding not to depen on desktops +- Showed Unicode code points on Unicode name list + +* Tue Feb 13 2018 Igor Gnatenko - 1.5.17-8 +- Remove useless requires + +* Tue Feb 06 2018 Takao Fujiwara - 1.5.17-7 +- Added Unicode typing on Emojier + +* Sat Feb 03 2018 Igor Gnatenko - 1.5.17-6 +- Switch to %%ldconfig_scriptlets + +* Fri Jan 19 2018 Takao Fujiwara - 1.5.17-5 +- Rebuilt for scriptlets + +* Wed Jan 17 2018 Takao Fujiwara - 1.5.17-4 +- Added DBus filtering + +* Sat Jan 06 2018 Igor Gnatenko - 1.5.17-3 +- Remove obsolete scriptlets + +* Fri Jan 05 2018 Igor Gnatenko - 1.5.17-2 +- Remove obsolete scriptlets + +* Sun Oct 22 2017 Takao Fujiwara - 1.5.17-1 +- Bumped to 1.5.17 + +* Thu Sep 21 2017 Takao Fujiwara - 1.5.16-11 +- Copy ibusimcontext.c +- Fix Super-space in Plasma after ibus exit + +* Wed Sep 20 2017 Takao Fujiwara - 1.5.16-10 +- Fix Bug 1490733 Emojier takes wrong fonts + +* Thu Sep 14 2017 Takao Fujiwara - 1.5.16-9 +- Fix scaling factor, mouse events on switcher, c-s-u on im-ibus, + propertypanel position and menu +- Add ibus-portal +- Move ibus-emoji-dialog.vapi in the build +- Fixed some SEGVs #1406699 #1432252 + +* Wed Aug 02 2017 Fedora Release Engineering - 1.5.16-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Mon Jul 31 2017 Florian Weimer - 1.5.16-7 +- Rebuild with binutils fix for ppc64le (#1475636) + +* Thu Jul 27 2017 Takao Fujiwara - 1.5.16-6 +- Fixed some SEGVs #1349148 #1385349 #1350291 #1368593 + Added 1385349-segv-bus-proxy.patch + +* Wed Jul 26 2017 Fedora Release Engineering - 1.5.16-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Jul 21 2017 Takao Fujiwara - 1.5.16-4 +- Fixed Bug 1471079 - SEGV of Emojier on de locale + +* Thu Jul 13 2017 Takao Fujiwara - 1.5.16-3 +- Enabled HarfBuzz rendering without Pango glyph calc for emoji + +* Mon May 29 2017 Takao Fujiwara - 1.5.16-2 +- Added ctrl-c,v,x for annotations and ctrl-shift-c for emoji +- Added Malay and Mongolian keymaps +- Made all emoji dicts to fully qualified + +* Mon May 15 2017 Takao Fujiwara - 1.5.16-1 +- Bumped to 1.5.16 + +* Tue May 09 2017 Takao Fujiwara - 1.5.15-8 +- Dropped nodejs-emojione-json and import unicode-emoji instead +- Created emoji tab in ibus-setup +- Set default emoji font size from gsettings in ibus emoji command +- Added an option of emoji partial match in ibus-setup +- Hid emoji variants by default +- Added ibus-emoji man page +- emoji favorites category is updated by selecting emoji + +* Thu Apr 13 2017 Takao Fujiwara - 1.5.15-7 +- Supported ibus emoji command on Wayland +- Changed modal dialog to modeless dialog + +* Wed Apr 05 2017 Takao Fujiwara - 1.5.15-6 +- Enabled unicode_alt in EmojiOne json file +- Enabled to type multiple code points on Emojier +- Fixed IBusEmojiDialog_1_0_gir_LIBS for --as-needed LDFLAGS + +* Mon Mar 27 2017 Takao Fujiwara - 1.5.15-5 +- Moved language setting on IBusEmojier to ibus-setup. +- Enabled strcasecmp to match emoji annotations. +- Added a build error message if emoji xml files are not found. + +* Wed Mar 15 2017 Takao Fujiwara - 1.5.15-4 +- Implemented Ctrl-[f|b|n|p|h|e|a|u] for cursor operations on emoji dialog +- Added XSetIOErrorHandler() for GNOME3 desktop + +* Mon Mar 13 2017 Takao Fujiwara - 1.5.15-3 +- Emoji dialog enhancements and bug fixes + Fixed ibus_emoji_dict_load() API. + Focus on emoji text entry by default + Removed internal text buffer and use Gtk.Entry buffer instead. + Implemented cursor left, right, home, end on emoji annotation preedit. + Show localized emoji description from tts in emoji xml. + +* Thu Mar 09 2017 Takao Fujiwara - 1.5.15-2 +- Added ibus-HEAD.patch to get upstream patches + Fixed ibus_emojier_run() SIGABRT with `ibus emoji` + Enhanced theme color on emoji candidates + +* Mon Mar 06 2017 Takao Fujiwara - 1.5.15-1 +- Bumped to 1.5.15 + +* Fri Feb 10 2017 Fedora Release Engineering - 1.5.14-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Wed Jan 11 2017 Takao Fujiwara - 1.5.14-5 +- support scroll event in candidates panel +- Fixed Bug 1403985 - Emoji typing is enabled during Unicode typing +- Fixed Bug 1402494 - Font settings of ibus are ignored on non-Gnome + +* Mon Dec 19 2016 Miro Hrončok - 1.5.14-4 +- Rebuild for Python 3.6 + +* Thu Oct 06 2016 Takao Fujiwara - 1.5.14-3 +- Fixed Bug 1380675 - Emoji leaves the candidates of @laugh when @laughing +- Fixed Bug 1380690 - User is not able to select emojis from digit keys +- Fixed Bug 1380691 - PageUp PageDown buttons on emoji lookup not working + +* Fri Sep 09 2016 Takao Fujiwara - 1.5.14-2 +- Fixed radio button on PropertyPanel. +- Updated translations. + +* Fri Aug 05 2016 Takao Fujiwara - 1.5.14-1 +- Bump to 1.5.14 + +* Wed Jul 27 2016 Dan Horák - 1.5.13-6 +- enable Emoji only on arches providing nodejs functionality + +* Tue Jul 26 2016 Takao Fujiwara - 1.5.13-5 +- Bug 1359753 - Implement Emoji typing + +* Tue Jul 19 2016 Fedora Release Engineering - 1.5.13-4 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + +* Mon Jun 27 2016 Takao Fujiwara - 1.5.13-3 +- Bug 1349732 - ibus not working at all in Gnome Wayland +- Add ibus service file +- Fix CSS color format and font size + +* Mon Mar 28 2016 Takao Fujiwara - 1.5.13-2 +- Bug 1319215 - Add Requires besides Requires(post) + +* Mon Feb 22 2016 Takao Fujiwara - 1.5.13-1 +- Bumped to 1.5.13 + +* Thu Feb 04 2016 Fedora Release Engineering - 1.5.12-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Jan 20 2016 Takao Fujiwara - 1.5.12-1 +- Bumped to 1.5.12 + +* Tue Nov 10 2015 Fedora Release Engineering - 1.5.11-2 +- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 + +* Thu Jul 16 2015 Takao Fujiwara - 1.5.11-1 +- Bumped to 1.5.11 +- Deleted with_python2_override_pkg macro +- Added glib2-doc BR + +* Wed Jun 17 2015 Fedora Release Engineering - 1.5.10-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Fri May 22 2015 Takao Fujiwara - 1.5.10-5 +- Updated ibus-HEAD.patch + Fixed Bug 1224025 - IBus radio menu items does not work + +* Fri Apr 24 2015 Takao Fujiwara - 1.5.10-4 +- Bug 1217410 Updated ibus-xinput for KDE5. + +* Fri Apr 24 2015 Takao Fujiwara - 1.5.10-3 +- Updated ibus-HEAD.patch from upstream + Fixed to show shortcuts on ibus-setup. + Bug 1214271 Fixed to enable IME with GTK3 applications in wayland. + +* Thu Apr 02 2015 Takao Fujiwara - 1.5.10-2 +- Updated ibus-HEAD.patch from upstream + Added Swedish svdvorak + I18N engine longnames and descriptions on ibus-setup + Moved PropertyPanel at bottom right in KDE5 + Drew gray color on Handle PropertyPanel + Enabled ibus engine full path icon in KDE5 + Updated translations + +* Wed Feb 25 2015 Takao Fujiwara - 1.5.10-1 +- Bumped to 1.5.10 + +* Sat Feb 21 2015 Till Maas - 1.5.9-11 +- Rebuilt for Fedora 23 Change + https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code + +* Mon Feb 02 2015 Petr Viktorin - 1.5.9-10 +- Remove dependency on Python 2 from main package + +* Mon Feb 02 2015 Takao Fujiwara - 1.5.9-9 +- Updated ibus-HEAD.patch to fix #1187956 IBusRegistry segv. + +* Thu Dec 18 2014 Takao Fujiwara - 1.5.9-8 +- Updated ibus-HEAD.patch to fix #1175595 ibus-x11 freeze + +* Mon Dec 08 2014 Takao Fujiwara - 1.5.9-7 +- Added ibus-1136623-lost-by-another-focus.patch to fix #1136623 + +* Mon Dec 08 2014 Takao Fujiwara - 1.5.9-6 +- Updated ibus-xx-increase-timeout.patch to fix #1163722 +- Updated ibus-HEAD.patch for upstream #1747, #1748, #1753 + and gnome #703020, gnome #730628 + +* Wed Nov 12 2014 Takao Fujiwara - 1.5.9-5 +- rhbz#1161871 Added BR of python and python3 + +* Tue Oct 28 2014 Takao Fujiwara - 1.5.9-4 +- Updated ibus-HEAD.patch for upstream #1744. + +* Fri Oct 24 2014 Takao Fujiwara - 1.5.9-3 +- Added ibus-xx-increase-timeout.patch + +* Wed Oct 01 2014 Takao Fujiwara - 1.5.9-2 +- Updated ibus-HEAD.patch for rhbz#1136623. +- Added ibus-po-1.5.9-20141001.tar.gz + +* Tue Sep 16 2014 Takao Fujiwara - 1.5.9-1 +- Bumped to 1.5.9 + +* Sat Aug 16 2014 Fedora Release Engineering - 1.5.8-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Thu Jul 24 2014 Takao Fujiwara - 1.5.8-1 +- Bumped to 1.5.8 +- Deleted ibus-810211-no-switch-by-no-trigger.patch +- Deleted ibus-541492-xkb.patch +- Deleted ibus-530711-preload-sys.patch +- Deleted ibus-xx-setup-frequent-lang.patch +- Deleted ibus-xx-f19-password.patch + +* Tue Jul 22 2014 Kalev Lember - 1.5.7-7 +- Rebuilt for gobject-introspection 1.41.4 + +* Mon Jul 14 2014 Takao Fujiwara - 1.5.7-6 +- Updated ibus-HEAD.patch from upstream. + Fixed ibus-setup SEGV when an engine is selected. + Fixed ibus-setup deprecated warnings with the latest python3-gobject. + Integrated the 'IBUS_SETUP_XID' environment variable for each engine setup. + Set prgname 'ibus-setup' for ibus-setup. + +* Mon Jul 07 2014 Takao Fujiwara - 1.5.7-5 +- Updated ibus-HEAD.patch from upstream. + Added pl(qwertz). + Fixed escape key with Ctrl-Shift-U. + Updated pt-br compose table from the latest xorg. + Do not sort ibus engines when they are saved by ibus-setup. + Updated jp IBusKeymap. + Added ibus reset-config and read-config sub-commands. + Update ibus(1) for read-config and reset-config. + +* Sat Jun 07 2014 Fedora Release Engineering - 1.5.7-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Tue May 27 2014 Kalev Lember - 1.5.7-3 +- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4 + +* Tue May 20 2014 Takao Fujiwara - 1.5.7-2 +- Updated ibus-HEAD.patch for width of ibus-setup. + +* Wed Apr 30 2014 Takao Fujiwara - 1.5.7-1 +- Bumped to 1.5.7 + +* Mon Apr 21 2014 Takao Fujiwara - 1.5.6-3 +- Do not require gtk-doc in ibus-devel-docs + +* Fri Mar 28 2014 Takao Fujiwara - 1.5.6-2 +- Updated ibus-HEAD.patch for Czech (qwerty) keymap. + +* Thu Mar 06 2014 Takao Fujiwara - 1.5.6-1 +- Bumped to 1.5.6 +- Deleted ibus-xx-ctrl-space.patch + +* Fri Jan 31 2014 Takao Fujiwara - 1.5.5-2 +- Enabled python3 ibus-setup + +* Tue Jan 14 2014 Takao Fujiwara - 1.5.5-1 +- Bumped to 1.5.5 +- Deleted notify-python in Requires + +* Fri Oct 04 2013 Takao Fujiwara - 1.5.4-2 +- Added ibus-HEAD.patch to sync upstream. + +* Fri Sep 20 2013 Takao Fujiwara - 1.5.4-1 +- Bumped to 1.5.4 +- Added ibus.conf.5 +- Added ibus-xkb-1.5.0.tar.gz for po files. +- Added ibus-xx-f19-password.patch for back compatibility. +- Added ibus-wayland in f20 or later. + +* Fri Jul 26 2013 Takao Fujiwara - 1.5.3-1 +- Bumped to 1.5.3 +- Deleted ibus-xx-g-s-disable-preedit.patch as EOL. +- Deleted ibus-gjs as EOL. +- Removed imsettings-gnome, im-chooser, libgnomekbd dependencies. + +* Thu Jul 11 2013 Takao Fujiwara - 1.5.2-8 +- Updated ibus-HEAD.patch to delete pyxdg dependencies. + +* Mon Jun 17 2013 Takao Fujiwara - 1.5.2-7 +- Bug 972328 - Deleted ibus-panel + +* Mon Jun 17 2013 Takao Fujiwara - 1.5.2-6 +- Bug 972328 - Bring back the dependency of ibus-setup. + +* Tue Jun 11 2013 Takao Fujiwara - 1.5.2-5 +- Removed dependencies of ibus-setup and ibus-pygtk2 + +* Wed Jun 05 2013 Takao Fujiwara - 1.5.2-4 +- Updated ibus-HEAD.patch for upstream. +- Added ibus-xx-1.5.2.patch until 1.5.3 will be released. +- Added ibus-xx-ctrl-space.patch for back compatible triggers. + +* Wed May 01 2013 Takao Fujiwara - 1.5.2-3 +- Updated ibus-HEAD.patch for upstream. +- Deleted ibus-947318-reconnect-gtk-client.patch + +* Sun Apr 21 2013 Takao Fujiwara - 1.5.2-2 +- Separate python files in f19 or later. + +* Thu Apr 18 2013 Takao Fujiwara - 1.5.2-1 +- Bumped to 1.5.2 +- Created noarch packages for python files due to .pyc and .pyo. +- Added man pages. + +* Mon Feb 18 2013 Takao Fujiwara - 1.5.1-3 +- Copied gtk2 module to gtk3 one. + +* Thu Jan 31 2013 Takao Fujiwara - 1.5.1-2 +- Updated ibus-530711-preload-sys.patch. Fixes #904799 + +* Tue Jan 08 2013 Takao Fujiwara - 1.5.1-1 +- Bumped to 1.5.1 +- Bumped to ibus-gjs 3.4.1.20130115 for f17 +- Removed ibus-xx-no-use.diff + +* Fri Dec 14 2012 Takao Fujiwara - 1.4.99.20121109-9 +- Updated ibus-xx-no-use.diff not to use variant.dup_strv() + +* Fri Dec 07 2012 Takao Fujiwara - 1.4.99.20121109-8 +- Resolves #869584 - Removed libgnomekbd dependency in f18. + +* Fri Nov 30 2012 Takao Fujiwara - 1.4.99.20121109-7 +- Set time stamp of ibus/_config.py + +* Fri Nov 30 2012 Takao Fujiwara - 1.4.99.20121109-6 +- Set time stamp of ibus/_config.py + +* Fri Nov 30 2012 Takao Fujiwara - 1.4.99.20121109-5 +- Updated spec file to work witout pkgconfig. + +* Tue Nov 27 2012 Takao Fujiwara - 1.4.99.20121109-4 +- Added comment lines for patches. + +* Tue Nov 27 2012 Takao Fujiwara - 1.4.99.20121109-3 +- Fixed misc issues. + +* Thu Oct 11 2012 Takao Fujiwara - 1.4.99.20121109-2 +- Obsoleted ibus-gnome3 + +* Thu Oct 11 2012 Takao Fujiwara - 1.4.99.20121109-1 +- Bumped to 1.4.99.20121109 +- Removed im-chooser, imsettings-gnome, gnome-icon-theme-symbolic + dependencies in f18 because ibus gnome integration is done. + Use ibus-keyboard instead of input-keyboard-symbolic. +- Disabled ibus-gjs build because of ibus gnome integration. + +* Thu Oct 11 2012 Takao Fujiwara - 1.4.99.20121006-2 +- Updated ibus-HEAD.patch to fix typo in data/dconf/profile/ibus + +* Thu Oct 11 2012 Takao Fujiwara - 1.4.99.20121006-2 +- Updated ibus-HEAD.patch to fix typo in data/dconf/profile/ibus + +* Sat Oct 06 2012 Takao Fujiwara - 1.4.99.20121006-1 +- Bumped to 1.4.99.20121006 +- Removed ibus-xx-segv-reg-prop.patch + +* Fri Sep 14 2012 Takao Fujiwara - 1.4.99.20120914-2 +- Added ibus-xx-segv-reg-prop.patch to avoid segv + +* Fri Sep 14 2012 Takao Fujiwara - 1.4.99.20120914-1 +- Bumped to 1.4.99.20120914 + +* Thu Sep 06 2012 Takao Fujiwara - 1.4.99.20120822-2 +- Updated ibus-530711-preload-sys.patch +- Updated ibus-541492-xkb.patch +- Updated ibus-xx-no-use.diff + Fixed Bug 854161 - not able to add keymap with ibus-setup + +* Wed Aug 22 2012 Takao Fujiwara - 1.4.99.20120822-1 +- Bumped to 1.4.99.20120822 +- Bumped to ibus-gjs 3.4.1.20120815 + Fixed Bug 845956 - ibus backward trigger key is not customized + Fixed Bug 844580 - ibus-dconf does not load the system gvdb +- Separated ibus-810211-no-switch-by-no-trigger.patch from ibus-HEAD.patch + +* Fri Jul 27 2012 Fedora Release Engineering - 1.4.99.20120712-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Thu Jul 19 2012 Takao Fujiwara - 1.4.99.20120712-2 +- Updated ibus-HEAD.patch + Support dconf 0.13.4 + +* Tue Jul 17 2012 Takao Fujiwara - 1.4.99.20120712-1 +- Bumped to 1.4.99.20120712 +- Removed ibus-xx-branding-switcher-ui.patch as upstreamed. + +* Fri Jun 8 2012 Matthias Clasen - 1.4.99.20120428-3 +- Rebuild against new libgnomekbd + +* Fri Apr 27 2012 Takao Fujiwara - 1.4.99.20120428-2 +- Updated ibus-HEAD.patch +- Updated ibus-541492-xkb.patch +- Updated ibus-xx-branding-switcher-ui.patch + Fixed Bug 810211 - Cancel Control + space pressing Control key. +- Updated ibus-xx-no-use.diff + Enabled to customize trigger keys with non-modifier trigger keys. + +* Fri Apr 27 2012 Takao Fujiwara - 1.4.99.20120428-1 +- Bumped to 1.4.99.20120428 + Fixed Bug 799571 - no IME list at the session login. + Fixed Bug 810415 - ibus does not handle Ctrl+space with BUTTON_PRESS. +- Bumped to ibus-gjs 3.4.1.20120428 + Fixed Bug 802052 - no modifiers trigger keys. + Fixed Bug 803244 - IME switch Ctrl+space not working on shell text entry. + +* Tue Apr 24 2012 Kalev Lember - 1.4.99.20120317-4 +- Update the dconf and icon cache rpm scriptlets + +* Wed Apr 18 2012 Takao Fujiwara - 1.4.99.20120317-3 +- Added a RHEL flag. + +* Tue Mar 27 2012 Takao Fujiwara - 1.4.99.20120317-2 +- Bumped to ibus-gjs 3.3.92.20120327 + +* Sat Mar 17 2012 Takao Fujiwara - 1.4.99.20120317-1 +- Bumped to 1.4.99.20120317 + Fixed Bug 718668 - focus move is slow with ibus-gnome3 + Fixed Bug 749497 - Enhance IME descriptions in status icon active menu +- Bumped to ibus-gjs 3.3.90.20120317 +- Added ibus-xx-no-use.diff + Fixed Bug 803260 - Disable non-global input method mode +- Updated ibus-HEAD.patch + Fixed Bug 803250 - ibus lookup window font customization + Fixed Bug 803177 - language id on ibus-ui-gtk3 switcher +- Update ibus-530711-preload-sys.patch + Fixed Bug 797023 - port preload engines + +* Thu Mar 08 2012 Takao Fujiwara - 1.4.99.20120303-3 +- Bumped to ibus-gjs 3.3.90.20120308 to work with gnome-shell 3.3.90 +- Fixed Bug 786906 - Added ifnarch ppc ppc64 s390 s390x +- Updated ibus-HEAD.patch + Fixed Bug 800897 - After doing "ctrl+space", ibus tray icon freezes + +* Mon Mar 05 2012 Takao Fujiwara - 1.4.99.20120303-2 +- Added ibus-HEAD.patch to fix python library to load libibus.so. + +* Sun Mar 04 2012 Takao Fujiwara - 1.4.99.20120303-1 +- Bumped to 1.4.99.20120303 + Fixed Bug 796070 - ibus-setup without no ibus-daemon + +* Wed Feb 08 2012 Takao Fujiwara - 1.4.99.20120203-3 +- Fixed ibus-setup on C locale +- Fixed to show no registered engines from g-c-c. +- Enabled Alt_R keybinding on ko locales for ibus gtk only. + +* Fri Feb 03 2012 Takao Fujiwara - 1.4.99.20120203-1 +- Updated to 1.4.99.20120203 +- Removed ibus-xx-bridge-hotkey.patch +- Updated ibus-541492-xkb.patch to use libgnomekbd. +- Updated ibus-xx-setup-frequent-lang.patch for 1.4.99.20120203 + +* Wed Jan 04 2012 Takao Fujiwara - 1.4.0-17 +- Added ibus-771115-property-compatible.patch for f16 + Fixed Bug 771115 - IBusProperty back compatibility. + +* Fri Dec 30 2011 Takao Fujiwara - 1.4.0-16 +- Enhanced ibus-gnome3 shell lookup window. +- Updated ibus-HEAD.patch from upstream + Fixed Bug 769135 - ibus-x11 SEGV in _process_key_event_done. +- Updated ibus-541492-xkb.patch + Fixed Bug 757889 - ibus-setup SEGV without active engine. + Fixed Bug 760213 - ibus-setup saves XKB variants correctly. + Fixed Bug 769133 - ibus-engine-xkb returns FALSE for ASCII typings. +- Updated ibus-xx-bridge-hotkey.patch for an enhancement. + +* Wed Nov 30 2011 Takao Fujiwara - 1.4.0-14 +- Enabled dconf. +- Updated ibus-HEAD.patch + Fixed Bug 618229 - engine setup buton on ibus-setup. +- Removed ibus-711632-fedora-fallback-icon.patch as upstreamed. +- Updated ibus-xx-bridge-hotkey.patch + Removed Enable/Disable buttons on ibus-setup + +* Fri Nov 18 2011 Takao Fujiwara - 1.4.0-11 +- Updated ibus-541492-xkb.patch + Fixed Bug 750484 - support reloading Xmodmap +- Updated ibus-HEAD.patch + Fixed Bug 753781 - ibus-x11 needs async for hangul ibus_commit_text. + +* Fri Nov 04 2011 Takao Fujiwara - 1.4.0-10 +- Updated ibus-xx-bridge-hotkey.patch for f16 + Fixed no XKB languages from layout only. e.g. in(eng). +- Updated ibus-541492-xkb.patch + Fixed not to show 'eng' on GUI for in(eng). + +* Wed Nov 02 2011 Takao Fujiwara - 1.4.0-9 +- Updated ibus-HEAD.patch + Fixed prev/next keys without global engine. +- Updated ibus-xx-bridge-hotkey.patch for f16 + Fixed Bug 747902 - mouse and ctrl+space not working + Fixed Bug 749770 - IME hotkey after Control + Space +- Updated ibus-711632-fedora-fallback-icon.patch + Fixed Bug 717831 - use old icon for desktops other than gnome + +* Fri Oct 28 2011 Takao Fujiwara - 1.4.0-8 +- Updated ibus-xx-bridge-hotkey.patch for f16 +- Fixed Bug 747902 - mouse and ctrl+space not working + +* Wed Oct 26 2011 Fedora Release Engineering - 1.4.0-6 +- Rebuilt for glibc bug#747377 + +* Fri Oct 21 2011 Takao Fujiwara - 1.4.0-5 +- Fixed Bug 747845 - ibus icon cannot open menu item on gnome-shell + +* Thu Oct 20 2011 Takao Fujiwara - 1.4.0-4 +- Fixed Bug 746869 - no keymaps if the XKB has no group and no variant + +* Fri Sep 30 2011 Takao Fujiwara - 1.4.0-3 +- Rebuilt for f16 gnome-shell 3.2 and gjs 1.30 + +* Wed Sep 28 2011 Takao Fujiwara - 1.4.0-2 +- Updated to 1.4.0 +- Updated ibus-gjs 3.0.2.20110928 for f15. +- Updated ibus-gjs 3.2.0.20110928 for f16. (#740588) +- Updated ibus-530711-preload-sys.patch + Fixed not to show duplicated engine names in setup treeview (#740447) +- Updated bus-gjs-xx-gnome-shell-3.1.4-build-failure.patch for f16. +- Updated ibus-xx-bridge-hotkey.patch + Fixed a XKB configuration without the input focus for f16 (#739165) + Fixed not to show null strings in case of no variants (#738130) + +* Tue Sep 13 2011 Takao Fujiwara - 1.3.99.20110817-5 +- Updated ibus-gjs 3.1.91.20110913 for f16. + +* Thu Sep 08 2011 Takao Fujiwara - 1.3.99.20110817-4 +- Updated ibus-gjs 3.1.91.20110908 and 3.0.2.20110908 for gnome-shell. + Fixed preedit active segments on gnome-shell and X11 apps. +- Added ibus-xx-g-s-disable-preedit.patch + Disabled preedit on gnome-shell for a workaround. +- Updated ibus.spec + Fixed Bug 735879 pre/postun scripts + +* Thu Sep 01 2011 Takao Fujiwara - 1.3.99.20110817-3 +- Fixed Bug 700472 Use a symbol icon instead of an image icon. +- Updated ibus-HEAD.patch for upstream. +- Removed ibus-435880-surrounding-text.patch as upstream. +- Added ibus-711632-fedora-fallback-icon.patch + Fixed SEGV with no icon in oxygen-gtk icon theme. +- Added ibus-xx-bridge-hotkey.patch + Triaged Bug 707370 SetEngine timeout + Fixed Bug 731610 Keep IM state when text input focus changes +- Added transitional ibus-gnome3 package. + Fixed Bug 718110 Use a shell icon instead of pygtk2 icon. + +* Thu May 26 2011 Takao Fujiwara - 1.3.99.20110419-1 +- Updated to 1.3.99.20110419 +- Added ibus-HEAD.patch + Fixed Bug 697471 - ibus-gconf zombie when restart ibus from ibus panel. +- Updated ibus-541492-xkb.patch + Fixed Bug 701202 - us(dvorak) does not show up in list + Updated ibus-1.0.pc for ibus-xkb + Showed XKB variant descriptions only without layout descriptions. +- Updated ibus-xx-setup-frequent-lang.patch + Updated UI strings + +* Tue Apr 19 2011 Takao Fujiwara - 1.3.99.20110408-1 +- Updated to 1.3.99.20110408 + Fixed Bug 683484 - Timed out SetEngine when select an engine from panel. + Fixed Bug 657165 - IBus for gnome-shell for Fedora 15. +- Upstreamed ibus-657165-panel-libs.patch +- Removed ibus-675503-gnome-shell-workaround.patch +- Added ibus-xx-setup-frequent-lang.patch +- Updated ibus-541492-xkb.patch + Fixed Bug 696481 - no the variant maps without language codes +- Added dependency of imsettings-gnome. + Fixed Bug 696510 - need a dependency in ibus-gtk3 for imsettings-gnome + +* Thu Mar 10 2011 Takao Fujiwara - 1.3.99.20110228-1 +- Updated to 1.3.99.20110228 +- Integrated the part of gjs in Bug 657165 ibus for gnome-shell. + Added ibus-657165-panel-libs.patch + Added gnome-shell-ibus-plugins-20110304.tar.bz2 +- Fixed Bug 675503 - a regression in sync mode + Added ibus-675503-gnome-shell-workaround.patch until gnome-shell is updated. +- Fixed Bug 677856 - left ibus snooper when im client is switched. +- Fixed Bug 673047 - abrt ibus_xkb_get_current_layout for non-XKB system + Updated ibus-541492-xkb.patch + +* Wed Feb 09 2011 Fedora Release Engineering - 1.3.99.20110127-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Fri Feb 04 2011 Takao Fujiwara - 1.3.99.20110127-1 +- Updated to 1.3.99.20110127 +- Updated ibus-HEAD.patch from upstream. + +* Wed Jan 26 2011 Takao Fujiwara - 1.3.99.20110117-1 +- Updated to 1.3.99.20110117 +- Fixed Bug 666427 - ibus requires dbus-x11 +- Fixed Bug 670137 - QT_IM_MODULE=xim in ibus.conf without ibus-qt + +* Thu Dec 09 2010 Takao Fujiwara - 1.3.99.20101202-1 +- Updated to 1.3.99.20101202 +- Added ibus-530711-preload-sys.patch + Fixed Bug 530711 - Reload preloaded engines by login + +* Fri Oct 29 2010 Takao Fujiwara - 1.3.99.20101028-1 +- Updated to 1.3.99.20101028 +- Integrated gdbus +- Merged notify.patch into ibus-HEAD.patch + +* Fri Oct 22 2010 Takao Fujiwara - 1.3.8-1 +- Updated to 1.3.8 +- Added ibus-541492-xkb.patch + Fixes Bug 541492 - ibus needs to support some xkb layout switching +- Added ibus-435880-surrounding-text.patch + Fixes Bug 435880 - ibus-gtk requires surrounding-text support +- Added ibus-xx-workaround-gtk3.patch + Workaround for f14 http://koji.fedoraproject.org/koji/taskinfo?taskID=2516604 + +* Mon Aug 23 2010 Takao Fujiwara - 1.3.7-1 +- Updated to 1.3.7 + +* Wed Jul 28 2010 Mamoru Tasaka - 1.3.6-5 +- Rebuild against python 2.7 + +* Thu Jul 22 2010 Jens Petersen - 1.3.6-4 +- keep bumping ibus-gtk obsoletes to avoid upgrade problems + +* Wed Jul 21 2010 David Malcolm - 1.3.6-3 +- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild + +* Thu Jul 15 2010 Colin Walters - 1.3.6-2 +- Rebuild with new gobject-introspection + +* Tue Jul 06 2010 Takao Fujiwara - 1.3.6-1 +- Update to 1.3.6 + +* Wed Jun 30 2010 Jens Petersen +- version the ibus-gtk obsolete and provides +- drop the old redundant ibus-qt obsoletes + +* Mon Jun 28 2010 Matthias Clasen - 1.3.5-3 +- Rebuild against newer gtk + +* Tue Jun 22 2010 Colin Walters - 1.3.5-2 +- Bump Release to keep ahead of F-13 + +* Sat Jun 12 2010 Peng Huang - 1.3.5-1 +- Update to 1.3.5 +- Support gtk3, gobject-introspection and vala. + +* Sat May 29 2010 Peng Huang - 1.3.4-2 +- Update to 1.3.4 + +* Sat May 29 2010 Peng Huang - 1.3.4-1 +- Update to 1.3.4 + +* Tue May 04 2010 Peng Huang - 1.3.3-1 +- Update to 1.3.3 + +* Sun May 02 2010 Peng Huang - 1.3.2-3 +- Embedded language bar in menu by default. +- Fix bug 587353 - [abrt] crash in ibus-1.3.2-2.fc12 + +* Sat Apr 24 2010 Peng Huang - 1.3.2-2 +- Add requires librsvg2 +- Update ibus-HEAD.patch: Update po files and and setting + +* Wed Apr 21 2010 Peng Huang - 1.3.2-1 +- Update to 1.3.2 +- Fix bug 583446 - [abrt] crash in ibus-1.3.1-1.fc12 + +* Mon Apr 05 2010 Peng Huang - 1.3.1-1 +- Update to 1.3.1 + +* Fri Mar 26 2010 Peng Huang - 1.3.0-3 +- Update ibus-HEAD.patch +- Fix bug - some time panel does not show candidates. +- Update some po files + +* Mon Mar 22 2010 Peng Huang - 1.3.0-2 +- Does not check glib micro version in ibus im module. + +* Mon Mar 22 2010 Peng Huang - 1.3.0-1 +- Update to 1.3.0 + +* Tue Feb 02 2010 Peng Huang - 1.2.99.20100202-1 +- Update to 1.2.99.20100202 + +* Mon Jan 11 2010 Peng Huang - 1.2.0.20100111-1 +- Update to 1.2.0.20100111 + +* Fri Dec 25 2009 Peng Huang - 1.2.0.20091225-1 +- Update to 1.2.0.20091225 +- Fix bug 513895 - new IME does not show up in ibus-setup +- Fix bug 531857 - applet order should correspond with preferences order +- Fix bug 532856 - should not list already added input-methods in Add selector + +* Tue Dec 15 2009 Peng Huang - 1.2.0.20091215-1 +- Update to 1.2.0.20091215 + +* Thu Dec 10 2009 Peng Huang - 1.2.0.20091204-2 +- Fix rpmlint warnings and errors. + +* Fri Dec 04 2009 Peng Huang - 1.2.0.20091204-1 +- Update to 1.2.0.20091204 +- Fix Bug 529920 - language panel pops up on the wrong monitor +- Fix Bug 541197 - Ibus crash + +* Tue Nov 24 2009 Peng Huang - 1.2.0.20091124-1 +- Update to 1.2.0.20091124 +- Update some translations. +- Fix bug 538147 - [abrt] crash detected in firefox-3.5.5-1.fc12 + +* Sat Oct 24 2009 Peng Huang - 1.2.0.20091024-1 +- Update to 1.2.0.20091024 + +* Wed Oct 14 2009 Peng Huang - 1.2.0.20091014-2 +- Update to 1.2.0.20091014 +- Change ICON in ibus.conf + +* Sun Sep 27 2009 Peng Huang - 1.2.0.20090927-1 +- Update to 1.2.0.20090927 + +* Tue Sep 15 2009 Peng Huang - 1.2.0.20090915-1 +- Update to 1.2.0.20090915 +- Fix bug 521591 - check if the icon filename is a real file before trying to open it +- Fix bug 522310 - Memory leak on show/hide +- Fix bug 509518 - ibus-anthy should only override to jp layout for kana input + +* Fri Sep 04 2009 Peng Huang - 1.2.0.20090904-2 +- Refresh the tarball. + +* Fri Sep 04 2009 Peng Huang - 1.2.0.20090904-1 +- Update to 1.2.0.20090904 + +* Mon Aug 31 2009 Peng Huang - 1.2.0.20090828-2 +- Change icon path in ibus.conf + +* Fri Aug 28 2009 Peng Huang - 1.2.0.20090828-1 +- Update to 1.2.0.20090828 +- Change the icon on systray. +- Fix segment fault in ibus_hotkey_profile_destroy +- Fix some memory leaks. + +* Wed Aug 12 2009 Peng Huang - 1.2.0.20090812-1 +- Update to 1.2.0.20090812 + +* Mon Aug 10 2009 Peng Huang - 1.2.0.20090807-4 +- Update ibus-HEAD.patch +- Fix Numlock problem. +- Fix some memory leaks. + +* Fri Aug 07 2009 Peng Huang - 1.2.0.20090807-2 +- Update ibus-HEAD.patch +- Fix bug 516154. + +* Fri Aug 07 2009 Peng Huang - 1.2.0.20090807-1 +- Update to 1.2.0.20090807 + +* Thu Aug 06 2009 Peng Huang - 1.2.0.20090806-1 +- Update to 1.2.0.20090806 +- Fix bug 515106 - don't install duplicate files + +* Tue Jul 28 2009 Peng Huang - 1.2.0.20090723-3 +- Update xinput-ibus: setup QT_IM_MODULE if the ibus qt input method plugin exists. + +* Fri Jul 24 2009 Fedora Release Engineering - 1.2.0.20090723-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Thu Jul 23 2009 Peng Huang - 1.2.0.20090723-1 +- Update to 1.2.0.20090723 +- Fix dead loop in ibus-gconf + +* Wed Jul 22 2009 Peng Huang - 1.2.0.20090722-1 +- Update to 1.2.0.20090722 + +* Sun Jul 19 2009 Peng Huang - 1.2.0.20090719-1 +- Update to 1.2.0.20090719 + +* Mon Jun 22 2009 Peng Huang - 1.2.0.20090617-1 +- Update to 1.2.0.20090617 + +* Fri Jun 12 2009 Peng Huang - 1.1.0.20090612-1 +- Update to 1.1.0.20090612 +- Fix bug 504942 - PageUp and PageDown do not work in candidate list +- Fix bug 491040 - Implememnt mouse selection in candidate list + +* Wed Jun 10 2009 Peng Huang - 1.1.0.20090609-1 +- Update to Update to 1.1.0.20090609 +- Fix bug 502414 - Implemented on-screen help facility +- Fix bug 502561 - iBus should show keymap name on iBus panel +- Fix bug 498043 - ibus Alt-grave trigger conflicts with openoffice.org +- Implemented API for setting labels for candidates in LookupTable + +* Sun May 31 2009 Peng Huang - 1.1.0.20090531-1 +- Update to Update to 1.1.0.20090531 + +* Tue May 26 2009 Peng Huang - 1.1.0.20090508-5 +- Update ibus-HEAD.patch. +- Show the default input method with bold text +- Add information text below input methods list + +* Mon May 25 2009 Peng Huang - 1.1.0.20090508-4 +- Update ibus-HEAD.patch. +- Fix bug 501211 - ibus-setup window should be raised if running or just stay on top/grab focus +- Fix bug 501640 - ibus should adds new IMEs at end of engine list not beginning +- Fix bug 501644 - [IBus] focus-out and disabled IME should hide language panel + +* Thu May 14 2009 Peng Huang - 1.1.0.20090508-2 +- Remove requires notification-daemon +- Fix bug 500588 - Hardcoded requirement for notification-daemon + +* Fri May 08 2009 Peng Huang - 1.1.0.20090508-1 +- Update to 1.1.0.20090508 +- Fix bug 499533 - [Indic] ibus should allow input in KDE using all supported Indic locales +- Fix bug 498352 - hotkey config table should list keys in same order as on main setup page +- Fix bug 497707 - ibus French translation update + +* Fri May 08 2009 Peng Huang - 1.1.0.20090423-3 +- Fix bug 498541 - ibus-libs should not contain devel file libibus.so + +* Tue May 05 2009 Peng Huang - 1.1.0.20090423-2 +- Fix bug 498141 - new ibus install needs gtk immodules +- Separate ibus document from ibus-devel to ibus-devel-docs + +* Thu Apr 23 2009 Peng Huang - 1.1.0.20090423-1 +- Update to ibus-1.1.0.20090423. +- Fix bug 497265 - [mai_IN] Maithili language name is not correct. +- Fix bug 497279 - IBus does not works with evolution correctly. +- Enhance authentication both in daemon & clients + +* Fri Apr 17 2009 Peng Huang - 1.1.0.20090417-1 +- Update to ibus-1.1.0.20090417. +- Fix bug 496199 - cannot remove Ctrl+Space hotkey with ibus-setup + +* Fri Apr 17 2009 Peng Huang - 1.1.0.20090413-4 +- Update ibus-HEAD.patch. +- Next Engine hotkey will do nothing if the IM is not active. + +* Wed Apr 15 2009 Peng Huang - 1.1.0.20090413-3 +- Update ibus-HEAD.patch. +- Fix bug 495431 - ibus Release modifier doesn't work with Alt +- Fix bug 494445 - ibus-hangul missing Hangul Han/En mode + (and Alt_R+release hotkey) +- Update te.po + +* Tue Apr 14 2009 Peng Huang - 1.1.0.20090413-2 +- Update ibus-HEAD.patch. +- Change the mode of /tmp/ibus-$USER to 0700 to improve security +- Change the mode of /tmp/ibus-$USER/socket-address to 0600 to improve security +- Update as.po + +* Mon Apr 13 2009 Peng Huang - 1.1.0.20090413-1 +- Update to ibus-1.1.0.20090413. +- Fix crash when restart the ibus-daemon +- Add some translations. + +* Tue Apr 07 2009 Peng Huang - 1.1.0.20090407-3 +- Update the tarball. +- Fix bug 494511 - ibus-gtk makes gnome-terminal abort + when a key is pressed + +* Tue Apr 07 2009 Peng Huang - 1.1.0.20090407-2 +- Update default hotkey settings. + +* Tue Apr 07 2009 Peng Huang - 1.1.0.20090407-1 +- Update to ibus-1.1.0.20090407. +- Fix bug 491042 - ibus default trigger hotkeys +- Fix bug 492929 - ibus-hangul can cause gtk app to lockup +- Fix bug 493701 - (ibus) imsettings disconnect/reconnect kills gtk app +- Fix bug 493687 - ibus-hangul should default to vertical candidate selection +- Fix bug 493449 - ibus broke Alt-F2 command auto-completion + +* Tue Mar 31 2009 Peng Huang - 1.1.0.20090331-1 +- Update to ibus-1.1.0.20090331. +- Fix bug 492956 - screws up keyboard input in firefox +- Fix bug 490143 - ibus issue with gnome-keyring + +* Sun Mar 29 2009 Peng Huang - 1.1.0.20090311-3 +- Recreate the ibus-HEAD.patch from upstream git source tree +- Fix bug 491999 - up/down arrow keys broken in xchat + +* Sat Mar 28 2009 Peng Huang - 1.1.0.20090311-2 +- Recreate the ibus-HEAD.patch from upstream git source tree. +- Fix bug 490009 - Deleting Next Engine shortcuts doesn't work +- Fix bug 490381 - Change "Next/Previous engine" labels + +* Wed Mar 11 2009 Peng Huang - 1.1.0.20090311-1 +- Update to ibus-1.1.0.20090311. +- Update setup ui follow GNOME Human Interface Guidelines 2.2 (#489497). + +* Fri Mar 6 2009 Peng Huang - 1.1.0.20090306-1 +- Update to ibus-1.1.0.20090306. + +* Tue Mar 3 2009 Jens Petersen +- use post for ibus-gtk requires glib2 + +* Mon Mar 2 2009 Jens Petersen - 1.1.0.20090225-2 +- drop the superfluous ibus-0.1 engine obsoletes +- move glib2 requires to gtk package + +* Wed Feb 25 2009 Peng Huang - 1.1.0.20090225-1 +- Update to ibus-1.1.0.20090225. +- Fix problems in %%post and %%postun scripts. +- Hide ibus & ibus preferences menu items. + +* Tue Feb 17 2009 Peng Huang - 1.1.0.20090211-10 +- Recreate the ibus-HEAD.patch from upstream git source tree. +- Put 'Select an input method' in engine select combobox (#485861). + +* Tue Feb 17 2009 Peng Huang - 1.1.0.20090211-9 +- Add requires im-chooser >= 1.2.5. + +* Tue Feb 17 2009 Peng Huang - 1.1.0.20090211-8 +- Recreate the ibus-HEAD.patch from upstream git source tree. +- Fix ibus-hangul segfault (#485438). + +* Mon Feb 16 2009 Peng Huang - 1.1.0.20090211-6 +- Recreate the ibus-HEAD.patch from upstream git source tree. +- The new patch fixes ibus-x11 segfault (#485661). + +* Sun Feb 15 2009 Peng Huang - 1.1.0.20090211-5 +- Recreate the ibus-HEAD.patch from upstream git source tree. + +* Sun Feb 15 2009 Peng Huang - 1.1.0.20090211-4 +- Remove gnome-python2-gconf from requires. + +* Fri Feb 13 2009 Peng Huang - 1.1.0.20090211-3 +- Update ibus-HEAD.patch, to fix bug 484652. + +* Fri Feb 13 2009 Peng Huang - 1.1.0.20090211-2 +- Add patch ibus-HEAD.patch, to update ibus to HEAD version. + +* Wed Feb 11 2009 Peng Huang - 1.1.0.20090211-1 +- Add --xim argument in xinput-ibus +- Add Obsoletes: ibus-qt <= 1.1.0 +- Move libibus.so.* to ibus-libs to make ibus multilib. +- Update to 1.1.0.20090211. + +* Thu Feb 05 2009 Peng Huang - 1.1.0.20090205-1 +- Update to 1.1.0.20090205. + +* Tue Feb 03 2009 Peng Huang - 0.1.1.20090203-1 +- Update to 0.1.1.20090203. + +* Sat Nov 29 2008 Ignacio Vazquez-Abrams - 0.1.1.20081023-3 +- Rebuild for Python 2.6 + +* Wed Nov 19 2008 Peng Huang - 0.1.1.20081023-2 +- Move libibus-gtk.so from ibus.rpm to ibus-gtk.rpm to fix bug 472146. + +* Thu Oct 23 2008 Peng Huang - 0.1.1.20081023-1 +- Update to 0.1.1.20081023. + +* Thu Oct 16 2008 Peng Huang - 0.1.1.20081016-1 +- Update to 0.1.1.20081016. + +* Tue Oct 7 2008 Jens Petersen - 0.1.1.20081006-3 +- remove the empty %%doc file entries + +* Tue Oct 7 2008 Jens Petersen - 0.1.1.20081006-2 +- add xinputrc alternative when installing or uninstalling + +* Mon Oct 06 2008 Peng Huang - 0.1.1.20081006-1 +- Update to 0.1.1.20081006. + +* Sun Oct 05 2008 Peng Huang - 0.1.1.20081005-1 +- Update to 0.1.1.20081005. + +* Sat Oct 04 2008 Peng Huang - 0.1.1.20081004-1 +- Update to 0.1.1.20081004. + +* Wed Oct 01 2008 Peng Huang - 0.1.1.20081001-1 +- Update to 0.1.1.20081001. + +* Tue Sep 30 2008 Peng Huang - 0.1.1.20080930-1 +- Update to 0.1.1.20080930. + +* Tue Sep 23 2008 Peng Huang - 0.1.1.20080923-1 +- Update to 0.1.1.20080923. + +* Wed Sep 17 2008 Peng Huang - 0.1.1.20080917-1 +- Update to 0.1.1.20080917. + +* Tue Sep 16 2008 Peng Huang - 0.1.1.20080916-1 +- Update to 0.1.1.20080916. + +* Mon Sep 15 2008 Peng Huang - 0.1.1.20080914-1 +- Update to 0.1.1.20080914. + +* Mon Sep 08 2008 Peng Huang - 0.1.1.20080908-1 +- Update to 0.1.1.20080908. + +* Mon Sep 01 2008 Peng Huang - 0.1.1.20080901-1 +- Update to 0.1.1.20080901. + +* Sat Aug 30 2008 Peng Huang - 0.1.1.20080830-1 +- Update to 0.1.1.20080830. + +* Mon Aug 25 2008 Peng Huang - 0.1.1.20080825-1 +- Update to 0.1.1.20080825. + +* Sat Aug 23 2008 Peng Huang - 0.1.1.20080823-1 +- Update to 0.1.1.20080823. + +* Fri Aug 15 2008 Peng Huang - 0.1.1.20080815-1 +- Update to 0.1.1.20080815. + +* Tue Aug 12 2008 Peng Huang - 0.1.1.20080812-1 +- Update to 0.1.1.20080812. + +* Mon Aug 11 2008 Peng Huang - 0.1.0.20080810-2 +- Add gnome-python2-gconf in Requires. + +* Thu Aug 07 2008 Peng Huang - 0.1.0.20080810-1 +- The first version.