diff --git a/.gitignore b/.gitignore index f718444..415a7e5 100644 --- a/.gitignore +++ b/.gitignore @@ -66,3 +66,4 @@ ibus-1.3.6.tar.gz /ibus-1.5.29-beta1.tar.gz /ibus-1.5.29-beta2.tar.gz /ibus-1.5.29-rc1.tar.gz +/ibus-1.5.29-rc2.tar.gz diff --git a/ibus-HEAD.patch b/ibus-HEAD.patch index a72a0a4..4f8febb 100644 --- a/ibus-HEAD.patch +++ b/ibus-HEAD.patch @@ -1,33 +1,3 @@ -From f44e4e35cf477bbd757dd6a6c657a8699eb41ca6 Mon Sep 17 00:00:00 2001 -From: fujiwarat -Date: Sat, 30 Sep 2023 09:48:07 +0900 -Subject: [PATCH] autogen: Revert DNF for Fedora 39 - -Seems DNF5 is deleted by default. - -Fixes: https://github.com/ibus/ibus/commit/f05c12d - -BUG=https://github.com/ibus/ibus/pull/2569 ---- - autogen.sh | 2 +- - 2 files changed, 2 insertions(+), 5 deletions(-) - -diff --git a/autogen.sh b/autogen.sh -index 05682f47..d6f8f983 100755 ---- a/autogen.sh -+++ b/autogen.sh -@@ -47,7 +47,7 @@ cd "$srcdir" - rpm -q $FEDORA_PKG1 || exit 1 - rpm -q $FEDORA_PKG2 || exit 1 - rpm -q $FEDORA_PKG3 || exit 1 -- (grep -qE '37|38' /etc/fedora-release) && DNF=dnf || DNF=dnf5 -+ DNF=dnf - $DNF update --assumeno $FEDORA_PKG1 || exit 1 - $DNF update --assumeno $FEDORA_PKG2 || exit 1 - $DNF update --assumeno $FEDORA_PKG3 || exit 1 --- -2.41.0 - From db829f4aee399e5472bd55dc630a94425e72bacd Mon Sep 17 00:00:00 2001 From: fujiwarat Date: Sat, 30 Sep 2023 09:51:43 +0900 @@ -1237,691 +1207,3 @@ index fe4cab45..10190921 100644 -- 2.41.0 -From 7431ac25bbbbe0d88eec6a241d7a35921c73bd01 Mon Sep 17 00:00:00 2001 -From: fujiwarat -Date: Fri, 29 Sep 2023 22:57:27 +0900 -Subject: [PATCH] client/wayland: Translate keycodes with CapsLock - -Fix CapsLock and some Latin characters with fr(azerty) layout in -Plasma Wayland. - -BUG=https://github.com/ibus/ibus/pull/2568 ---- - client/wayland/ibuswaylandim.c | 9 +-------- - 1 file changed, 1 insertion(+), 8 deletions(-) - -diff --git a/client/wayland/ibuswaylandim.c b/client/wayland/ibuswaylandim.c -index ffc20de1..e3aae3d4 100644 ---- a/client/wayland/ibuswaylandim.c -+++ b/client/wayland/ibuswaylandim.c -@@ -840,8 +840,6 @@ input_method_keyboard_key (void *data, - IBusWaylandIMPrivate *priv; - IBusWaylandKeyEvent event = { 0, }; - uint32_t code; -- uint32_t num_syms; -- const xkb_keysym_t *syms; - - g_return_if_fail (IBUS_IS_WAYLAND_IM (wlim)); - priv = ibus_wayland_im_get_instance_private (wlim); -@@ -862,12 +860,7 @@ input_method_keyboard_key (void *data, - event.key = key; - event.state = state; - code = key + 8; -- num_syms = xkb_key_get_syms (priv->state, code, &syms); -- -- event.sym = XKB_KEY_NoSymbol; -- if (num_syms == 1) -- event.sym = syms[0]; -- -+ event.sym = xkb_state_key_get_one_sym (priv->state, code); - event.modifiers = priv->modifiers; - if (state == WL_KEYBOARD_KEY_STATE_RELEASED) - event.modifiers |= IBUS_RELEASE_MASK; --- -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); -@@ -2420,6 +2420,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)", -@@ -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,27 @@ ibus_input_context_post_process_key_event (IBusInputContext *context) - state | IBUS_FORWARD_MASK); - break; - } -+ case 'r': { -+ priv->needs_surrounding_text = TRUE; -+ g_signal_emit (context, -+ context_signals[REQUIRE_SURROUNDING_TEXT], 0); -+ 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; - -@@ -943,6 +957,7 @@ _ic_process_key_event (BusInputContext *context, - */ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("(b)", TRUE)); -+ context->processing_key_event = FALSE; - return; - } - if (G_UNLIKELY (!context->has_focus)) { -@@ -1005,6 +1020,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, -@@ -2375,27 +2462,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)", -@@ -2415,26 +2493,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)", -@@ -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,104 @@ 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; -+ g_signal_emit (context, context_signals[REQUIRE_SURROUNDING_TEXT], 0); -+} -+ -+ -+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,43 +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; -- g_signal_emit (context, -- context_signals[REQUIRE_SURROUNDING_TEXT], 0); -+ 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 - diff --git a/ibus.spec b/ibus.spec index 839ddec..3b0d886 100644 --- a/ibus.spec +++ b/ibus.spec @@ -57,8 +57,8 @@ %global dbus_python_version 0.83.0 Name: ibus -Version: 1.5.29~rc1 -Release: 6%{?dist} +Version: 1.5.29~rc2 +Release: 1%{?dist} Summary: Intelligent Input Bus for Linux OS License: LGPL-2.1-or-later URL: https://github.com/ibus/%name/wiki @@ -580,6 +580,9 @@ dconf update || : %{_datadir}/installed-tests/ibus %changelog +* Thu Nov 09 2023 Takao Fujiwara - 1.5.29~rc2-1 +- Bump to 1.5.29-rc2 + * Wed Oct 25 2023 Takao Fujiwara - 1.5.29~rc1-6 - Add preedit D-Bus signals to PostProcessKeyEvent diff --git a/sources b/sources index 15e2add..638655b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ibus-1.5.29-rc1.tar.gz) = 776a01bcfd730be67e0f7d730f7b4b0a586d39744deb605359330a1786542acae52efbc085c39b8417b20164e45c259b40b29725f53fb1b69e2b340778ff28dc +SHA512 (ibus-1.5.29-rc2.tar.gz) = 47dd39c9615783b6c157a25e8a2506dc2e1f440d56aa649ee8cb95a390cb4efab9c95e72ac84b5d042c25e350599b4d352ddc66f1385af6660d4a7a296e44ca7