public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Takao Fujiwara <tfujiwar@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/ibus] autotool: Fix some bug fixes in Fedora and upstream
Date: Sun, 31 May 2026 02:09:08 GMT	[thread overview]
Message-ID: <178019334830.1.16467660454623119513.rpms-ibus-41fe4ec09aed@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/ibus
            Branch : autotool
            Commit : 41fe4ec09aed95b00933345a0a66da58a3e081a1
            Author : Takao Fujiwara <tfujiwar@redhat.com>
            Date   : 2026-01-10T22:01:07+09:00
            Stats  : +754/-29 in 3 file(s)
            URL    : https://src.fedoraproject.org/rpms/ibus/c/41fe4ec09aed95b00933345a0a66da58a3e081a1?branch=autotool

            Log:
            Fix some bug fixes in Fedora and upstream

- Resolves: #2419469 Fix SEGV with double bus_name_acquired_cb()
- Resolves: #2424256 Delete Requires desktop-file-utils in spec
- Resolves: #2425585 Separate lxqt-wayland-session and lxqt-x11-session in spec
- Resolves: #2428238 Add awesome in spec
- Rebase: #1797120 Fix assertion in panel_binding_construct()
- Connect delete surrounding text in ibus-wayland
- Fix Backspace after commit-text in Ghostty in ibus-wayland

---
diff --git a/ibus-1385349-segv-bus-proxy.patch b/ibus-1385349-segv-bus-proxy.patch
index 2d919b2..9084ee0 100644
--- a/ibus-1385349-segv-bus-proxy.patch
+++ b/ibus-1385349-segv-bus-proxy.patch
@@ -32,9 +32,6 @@ 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()
-
 rhbz#2151344 SEGV with portal_context->owner in name_owner_changed()
 Maybe g_object_unref() is called but not finalized yet.
 
@@ -48,7 +45,6 @@ BUG=rhbz#1663528
 BUG=rhbz#1795499
 BUG=rhbz#1771238
 BUG=rhbz#1767976
-BUG=rhbz#1797120
 BUG=rhbz#2151344
 BUG=rhbz#2195895
 BUG=rhbz#2239633
@@ -59,9 +55,8 @@ BUG=rhbz#2239633
  client/x11/main.c      | 49 +++++++++++++++++++++++++++++++++++++-----
  portal/portal.c        | 25 ++++++++++++++++-----
  src/ibusbus.c          |  6 ++++++
- ui/gtk3/extension.vala |  4 ++++
  ui/gtk3/switcher.vala  | 48 +++++++++++++++++++++++++----------------
- 8 files changed, 188 insertions(+), 44 deletions(-)
+ 7 files changed, 188 insertions(+), 44 deletions(-)
 
 diff --git a/bus/dbusimpl.c b/bus/dbusimpl.c
 index 70792be8..9c535bf2 100644
@@ -508,21 +503,6 @@ index 540d1da3..defdb73b 100644
          g_object_unref (bus->priv->monitor);
          bus->priv->monitor = NULL;
      }
-diff --git a/ui/gtk3/extension.vala b/ui/gtk3/extension.vala
-index 5cd1a6ad..3acd76ea 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 d4a5fa11..788eea06 100644
 --- a/ui/gtk3/switcher.vala

diff --git a/ibus-HEAD.patch b/ibus-HEAD.patch
index 3fd2b32..4b2af15 100644
--- a/ibus-HEAD.patch
+++ b/ibus-HEAD.patch
@@ -2628,3 +2628,743 @@ index 00000000..71f530da
 -- 
 2.52.0
 
+From d77d6998001557c80c4ac0a1eec31f0a18acfd65 Mon Sep 17 00:00:00 2001
+From: David Edmundson <kde@davidedmundson.co.uk>
+Date: Thu, 8 Jan 2026 23:10:16 +0900
+Subject: [PATCH] client/wayland: Connect delete surrounding text
+
+This wasn't hooked up in the wayland bridge leading to typing not
+working correctly when the backend relies on it.
+
+As well as bridging we need to translate the offset in number of unicode
+characters into a number of bytes for the wayland wire format. The logic
+for this translation is inspired by how it works in Mutter which
+converts IBus->TextInput directly.
+
+Note that InputMethodV1 takes an offset + length, whereas V2 has a
+length before and after.
+
+BUG=https://github.com/ibus/ibus/pull/2830
+---
+ client/wayland/ibuswaylandim.c | 88 +++++++++++++++++++++++++++++++++-
+ 1 file changed, 86 insertions(+), 2 deletions(-)
+
+diff --git a/client/wayland/ibuswaylandim.c b/client/wayland/ibuswaylandim.c
+index 2d9f822e..6580b8a4 100644
+--- a/client/wayland/ibuswaylandim.c
++++ b/client/wayland/ibuswaylandim.c
+@@ -124,6 +124,11 @@ struct _IBusWaylandIMPrivate
+     guint preedit_mode;
+     IBusModifierType modifiers;
+ 
++#if ENABLE_SURROUNDING
++    IBusText *surrounding_text;
++    guint surrounding_cursor_pos;
++#endif
++
+     struct xkb_context *xkb_context;
+ 
+     struct xkb_keymap *keymap;
+@@ -616,6 +621,7 @@ ibus_wayland_im_update_preedit_style (IBusWaylandIM *wlim)
+     }
+ }
+ 
++
+ static void
+ _context_show_preedit_text_cb (IBusInputContext *context,
+                                IBusWaylandIM    *wlim)
+@@ -706,6 +712,61 @@ _context_update_preedit_text_cb (IBusInputContext *context,
+ }
+ 
+ 
++#if ENABLE_SURROUNDING
++static void
++_context_delete_surrounding_text_cb (IBusInputContext *context,
++                                     gint              offset,
++                                     guint             nchars,
++                                     IBusWaylandIM    *wlim)
++{
++    IBusWaylandIMPrivate *priv;
++    const char *start, *end;
++    const char *before, *after;
++    const char *cursor;
++    uint32_t before_length;
++    uint32_t after_length;
++
++    g_return_if_fail (IBUS_IS_WAYLAND_IM (wlim));
++    priv = ibus_wayland_im_get_instance_private (wlim);
++
++    if (!priv->surrounding_text)
++        return;
++
++    offset = MIN (offset, 0);
++
++    start = priv->surrounding_text->text;
++    end = start + strlen (priv->surrounding_text->text);
++    cursor = start + priv->surrounding_cursor_pos;
++
++    before = g_utf8_offset_to_pointer (cursor, offset);
++    g_return_if_fail (before >= start);
++    after = g_utf8_offset_to_pointer (cursor, offset + nchars);
++    g_return_if_fail (after <= end);
++
++    before_length = cursor - before;
++    after_length = after - cursor;
++
++    switch (priv->version) {
++    case INPUT_METHOD_V1:
++        zwp_input_method_context_v1_delete_surrounding_text (
++                priv->context,
++                -before_length,
++                before_length + after_length);
++        break;
++    case INPUT_METHOD_V2:
++        zwp_input_method_v2_delete_surrounding_text (
++                priv->seat->input_method_v2,
++                before_length,
++                after_length);
++        zwp_input_method_v2_commit (priv->seat->input_method_v2, priv->serial);
++        break;
++    default:
++        g_assert_not_reached ();
++    }
++}
++#endif
++
++
+ static void
+ handle_surrounding_text (void                                  *data,
+                          struct zwp_input_method_context_union *context,
+@@ -716,15 +777,23 @@ handle_surrounding_text (void                                  *data,
+ #if ENABLE_SURROUNDING
+     IBusWaylandIM *wlim = data;
+     IBusWaylandIMPrivate *priv;
++    IBusText *ibustext;
+ 
+     g_return_if_fail (IBUS_IS_WAYLAND_IM (wlim));
+     priv = ibus_wayland_im_get_instance_private (wlim);
++
++    ibustext = ibus_text_new_from_string (text);
++
++    if (priv->surrounding_text)
++        g_object_unref (priv->surrounding_text);
++    priv->surrounding_text = g_object_ref_sink (ibustext);
++    priv->surrounding_cursor_pos = cursor;
++
+     if (priv->ibuscontext != NULL &&
+         ibus_input_context_needs_surrounding_text (priv->ibuscontext)) {
+         /* CURSOR_POS and ANCHOR_POS are character offset.  */
+         guint cursor_pos = g_utf8_pointer_to_offset (text, text + cursor);
+         guint anchor_pos = g_utf8_pointer_to_offset (text, text + anchor);
+-        IBusText *ibustext = ibus_text_new_from_string (text);
+ 
+         ibus_input_context_set_surrounding_text (priv->ibuscontext,
+                                                  ibustext,
+@@ -1762,8 +1831,12 @@ _create_input_context_done (GObject      *object,
+         g_signal_connect (priv->ibuscontext, "hide-preedit-text",
+                           G_CALLBACK (_context_hide_preedit_text_cb),
+                           wlim);
+-    
++
+ #ifdef ENABLE_SURROUNDING
++        g_signal_connect (priv->ibuscontext, "delete-surrounding-text",
++                          G_CALLBACK (_context_delete_surrounding_text_cb),
++                          wlim);
++
+         capabilities |= IBUS_CAP_SURROUNDING_TEXT;
+ #endif
+         if (_use_sync_mode == 1)
+@@ -1882,7 +1955,14 @@ input_method_deactivate (void                               *data,
+                 priv->ibuscontext,
+                 G_CALLBACK (_context_hide_preedit_text_cb),
+                 wlim);
++#ifdef ENABLE_SURROUNDING
++        g_signal_handlers_disconnect_by_func (
++                priv->ibuscontext,
++                G_CALLBACK (_context_delete_surrounding_text_cb),
++                wlim);
++#endif
+         g_clear_object (&priv->ibuscontext);
++
+         g_signal_emit (wlim,
+                        wayland_im_signals[IBUS_FOCUS_OUT],
+                        0,
+@@ -1892,6 +1972,10 @@ input_method_deactivate (void                               *data,
+ 
+     if (priv->preedit_text)
+         g_clear_object (&priv->preedit_text);
++#if ENABLE_SURROUNDING
++    if (priv->surrounding_text)
++        g_clear_object (&priv->surrounding_text);
++#endif
+ 
+     switch (priv->version) {
+     case INPUT_METHOD_V1:
+-- 
+2.52.0
+
+From 696261108c8830e1e30327a0a47cfb30ba5da7d1 Mon Sep 17 00:00:00 2001
+From: fujiwarat <takao.fujiwara1@gmail.com>
+Date: Fri, 26 Dec 2025 10:15:30 +0900
+Subject: [PATCH] client/wayland: Fix Backspace after commit-text in Ghostty
+
+Ghostty requires to hide the preedit-text to recover to commit the
+control characters. GtkIMContextWayland can emit the 'preedit-end'
+signal in case zwp_text_input_v3_listener.done is emitted.
+Unfortunately zwp_input_method_v2_set_preedit_string() does not support
+to send a %NULL string while zwp_text_input_v3_listener.preedit_string()
+*does* support a %NULL string.
+To make sure the hiding preedit-text, ibus-wayland calls
+zwp_input_method_v2_commit() after the im_serial is updated.
+
+BUG=https://github.com/ibus/ibus/issues/2819
+---
+ client/wayland/ibuswaylandim.c | 91 +++++++++++++++++++++-------------
+ 1 file changed, 57 insertions(+), 34 deletions(-)
+
+diff --git a/client/wayland/ibuswaylandim.c b/client/wayland/ibuswaylandim.c
+index 2d9f822e..bce050d4 100644
+--- a/client/wayland/ibuswaylandim.c
++++ b/client/wayland/ibuswaylandim.c
+@@ -123,6 +123,7 @@ struct _IBusWaylandIMPrivate
+     guint preedit_cursor_pos;
+     guint preedit_mode;
+     IBusModifierType modifiers;
++    gboolean hiding_preedit_text;
+ 
+ #if ENABLE_SURROUNDING
+     IBusText *surrounding_text;
+@@ -147,7 +148,7 @@ struct _IBusWaylandIMPrivate
+     xkb_mod_mask_t hyper_mask;
+     xkb_mod_mask_t meta_mask;
+ 
+-    uint32_t serial;
++    uint32_t im_serial;
+     int32_t repeat_rate;
+     int32_t repeat_delay;
+ 
+@@ -157,7 +158,7 @@ struct _IBusWaylandIMPrivate
+ struct _IBusWaylandKeyEvent
+ {
+     struct zwp_input_method_context_v1 *context;
+-    uint32_t serial;
++    uint32_t key_serial;
+     uint32_t time;
+     uint32_t key;
+     enum wl_keyboard_key_state state;
+@@ -324,12 +325,13 @@ ibus_wayland_im_commit_text (IBusWaylandIM *wlim,
+     switch (priv->version) {
+     case INPUT_METHOD_V1:
+         zwp_input_method_context_v1_commit_string (priv->context,
+-                                                   priv->serial,
++                                                   priv->im_serial,
+                                                    str);
+         break;
+     case INPUT_METHOD_V2:
+         zwp_input_method_v2_commit_string (priv->seat->input_method_v2, str);
+-        zwp_input_method_v2_commit (priv->seat->input_method_v2, priv->serial);
++        zwp_input_method_v2_commit (priv->seat->input_method_v2,
++                                    priv->im_serial);
+         break;
+     default:
+         g_assert_not_reached ();
+@@ -339,7 +341,7 @@ ibus_wayland_im_commit_text (IBusWaylandIM *wlim,
+ 
+ static void
+ ibus_wayland_im_key (IBusWaylandIM *wlim,
+-                     uint32_t       serial,
++                     uint32_t       key_serial,
+                      uint32_t       time,
+                      uint32_t       key,
+                      uint32_t       state)
+@@ -350,7 +352,7 @@ ibus_wayland_im_key (IBusWaylandIM *wlim,
+     switch (priv->version) {
+     case INPUT_METHOD_V1:
+         zwp_input_method_context_v1_key (priv->context,
+-                                         serial,
++                                         key_serial,
+                                          time,
+                                          key,
+                                          state);
+@@ -367,7 +369,7 @@ ibus_wayland_im_key (IBusWaylandIM *wlim,
+ 
+ static void
+ ibus_wayland_im_keysym (IBusWaylandIM *wlim,
+-                        uint32_t       serial,
++                        uint32_t       im_serial,
+                         guint          keyval,
+                         uint32_t       state,
+                         guint          modifiers)
+@@ -378,7 +380,7 @@ ibus_wayland_im_keysym (IBusWaylandIM *wlim,
+     switch (priv->version) {
+     case INPUT_METHOD_V1:
+         zwp_input_method_context_v1_keysym (priv->context,
+-                                            serial,
++                                            im_serial,
+                                             0,
+                                             keyval,
+                                             state,
+@@ -420,7 +422,7 @@ _context_forward_key_event_cb (IBusInputContext *context,
+         state = WL_KEYBOARD_KEY_STATE_PRESSED;
+ 
+     ibus_wayland_im_keysym (wlim,
+-                            priv->serial,
++                            priv->im_serial,
+                             keyval,
+                             state,
+                             modifiers);
+@@ -645,7 +647,7 @@ _context_show_preedit_text_cb (IBusInputContext *context,
+                                                     cursor);
+         ibus_wayland_im_update_preedit_style (wlim);
+         zwp_input_method_context_v1_preedit_string (priv->context,
+-                                                    priv->serial,
++                                                    priv->im_serial,
+                                                     priv->preedit_text->text,
+                                                     commit);
+         break;
+@@ -655,7 +657,9 @@ _context_show_preedit_text_cb (IBusInputContext *context,
+                 priv->preedit_text->text,
+                 cursor,
+                 strlen (priv->preedit_text->text));
+-        zwp_input_method_v2_commit (priv->seat->input_method_v2, priv->serial);
++        zwp_input_method_v2_commit (priv->seat->input_method_v2,
++                                    priv->im_serial);
++        priv->hiding_preedit_text = FALSE;
+         break;
+     default:
+         g_assert_not_reached ();
+@@ -673,14 +677,16 @@ _context_hide_preedit_text_cb (IBusInputContext *context,
+     switch (priv->version) {
+     case INPUT_METHOD_V1:
+         zwp_input_method_context_v1_preedit_string (priv->context,
+-                                                    priv->serial,
++                                                    priv->im_serial,
+                                                     "",
+                                                     "");
+         break;
+     case INPUT_METHOD_V2:
+         zwp_input_method_v2_set_preedit_string  (priv->seat->input_method_v2,
+                                                  "", 0, 0);
+-        zwp_input_method_v2_commit (priv->seat->input_method_v2, priv->serial);
++        zwp_input_method_v2_commit (priv->seat->input_method_v2,
++                                    priv->im_serial);
++        priv->hiding_preedit_text = TRUE;
+         break;
+     default:
+         g_assert_not_reached ();
+@@ -758,7 +764,8 @@ _context_delete_surrounding_text_cb (IBu
+                 priv->seat->input_method_v2,
+                 before_length,
+                 after_length);
+-        zwp_input_method_v2_commit (priv->seat->input_method_v2, priv->serial);
++        zwp_input_method_v2_commit (priv->seat->input_method_v2,
++                                    priv->im_serial);
+         break;
+     default:
+         g_assert_not_reached ();
+@@ -851,7 +858,7 @@ context_commit_state_v1 (void                               *data,
+     IBusWaylandIMPrivate *priv;
+     g_return_if_fail (IBUS_IS_WAYLAND_IM (wlim));
+     priv = ibus_wayland_im_get_instance_private (wlim);
+-    priv->serial = serial;
++    priv->im_serial = serial;
+ }
+ 
+ 
+@@ -1151,7 +1158,7 @@ _process_key_event_done (GObject      *object,
+     /* Check retral from ibus_wayland_im_post_key() */
+     if (priv->ibuscontext && !retval) {
+         ibus_wayland_im_key (event->wlim,
+-                             event->serial,
++                             event->key_serial,
+                              event->time,
+                              event->key,
+                              event->state);
+@@ -1234,7 +1241,7 @@ _process_key_event_sync (IBusWaylandIM       *wlim,
+                                        retval);
+     if (!retval) {
+         ibus_wayland_im_key (wlim,
+-                             event->serial,
++                             event->key_serial,
+                              event->time,
+                              event->key,
+                              event->state);
+@@ -1264,7 +1271,7 @@ _process_key_event_async (IBusWaylandIM       *wlim,
+         return;
+     }
+     async_event->context = priv->context;
+-    async_event->serial = event->serial;
++    async_event->key_serial = event->key_serial;
+     async_event->time = event->time;
+     async_event->key = event->key;
+     async_event->modifiers = event->modifiers & ~IBUS_RELEASE_MASK;
+@@ -1336,7 +1343,7 @@ _process_key_event_hybrid_async (IBusWaylandIM       *wlim,
+     }
+     if (priv->ibuscontext && !async_event->retval) {
+         ibus_wayland_im_key (wlim,
+-                             event->serial,
++                             event->key_serial,
+                              event->time,
+                              event->key,
+                              event->state);
+@@ -1506,7 +1513,7 @@ key_event_check_repeat (IBusWaylandIM       *wlim,
+ static void
+ input_method_keyboard_key (void                      *data,
+                            struct zwp_keyboard_union *keyboard,
+-                           uint32_t                   serial,
++                           uint32_t                   key_serial,
+                            uint32_t                   time,
+                            uint32_t                   key,
+                            uint32_t                   state)
+@@ -1528,11 +1535,11 @@ input_method_keyboard_key (void                      *data,
+                                                     state,
+                                                     FALSE);
+         if (!retval)
+-            ibus_wayland_im_key (wlim, serial, time, key, state);
++            ibus_wayland_im_key (wlim, key_serial, time, key, state);
+         return;
+     }
+ 
+-    event.serial = serial;
++    event.key_serial = key_serial;
+     event.time = time;
+     event.key = key;
+     event.state = state;
+@@ -1563,7 +1570,7 @@ input_method_keyboard_key (void                      *data,
+ static void
+ input_method_keyboard_modifiers (void                      *data,
+                                  struct zwp_keyboard_union *keyboard,
+-                                 uint32_t                   serial,
++                                 uint32_t                   key_serial,
+                                  uint32_t                   mods_depressed,
+                                  uint32_t                   mods_latched,
+                                  uint32_t                   mods_locked,
+@@ -1607,7 +1614,7 @@ input_method_keyboard_modifiers (void                      *data,
+ 
+     switch (priv->version) {
+     case INPUT_METHOD_V1:
+-        zwp_input_method_context_v1_modifiers (priv->context, serial,
++        zwp_input_method_context_v1_modifiers (priv->context, key_serial,
+                                                mods_depressed, mods_latched,
+                                                mods_locked, group);
+         break;
+@@ -1659,21 +1666,21 @@ input_method_keyboard_keymap_v1 (void               *data,
+ static void
+ input_method_keyboard_key_v1 (void               *data,
+                               struct wl_keyboard *keyboard_v1,
+-                              uint32_t            serial,
++                              uint32_t            key_serial,
+                               uint32_t            time,
+                               uint32_t            key,
+                               uint32_t            state)
+ {
+     struct zwp_keyboard_union keyboard;
+     keyboard.u.keyboard_v1 = keyboard_v1;
+-    input_method_keyboard_key (data, &keyboard, serial, time, key, state);
++    input_method_keyboard_key (data, &keyboard, key_serial, time, key, state);
+ }
+ 
+ 
+ static void
+ input_method_keyboard_modifiers_v1 (void               *data,
+                                     struct wl_keyboard *keyboard_v1,
+-                                    uint32_t            serial,
++                                    uint32_t            key_serial,
+                                     uint32_t            mods_depressed,
+                                     uint32_t            mods_latched,
+                                     uint32_t            mods_locked,
+@@ -1683,7 +1690,7 @@ input_method_keyboard_modifiers_v1 (void               *data,
+     keyboard.u.keyboard_v1 = keyboard_v1;
+     input_method_keyboard_modifiers (data,
+                                      &keyboard,
+-                                     serial,
++                                     key_serial,
+                                      mods_depressed,
+                                      mods_latched,
+                                      mods_locked,
+@@ -1721,14 +1728,14 @@ static void
+ input_method_keyboard_key_v2 (void    *data,
+                               struct zwp_input_method_keyboard_grab_v2
+                                       *keyboard_v2,
+-                              uint32_t serial,
++                              uint32_t key_serial,
+                               uint32_t time,
+                               uint32_t key,
+                               uint32_t state)
+ {
+     struct zwp_keyboard_union keyboard;
+     keyboard.u.keyboard_v2 = keyboard_v2;
+-    input_method_keyboard_key (data, &keyboard, serial, time, key, state);
++    input_method_keyboard_key (data, &keyboard, key_serial, time, key, state);
+ }
+ 
+ 
+@@ -1736,7 +1743,7 @@ static void
+ input_method_keyboard_modifiers_v2 (void    *data,
+                                     struct zwp_input_method_keyboard_grab_v2
+                                             *keyboard_v2,
+-                                    uint32_t serial,
++                                    uint32_t key_serial,
+                                     uint32_t mods_depressed,
+                                     uint32_t mods_latched,
+                                     uint32_t mods_locked,
+@@ -1746,7 +1753,7 @@ input_method_keyboard_modifiers_v2 (void    *data,
+     keyboard.u.keyboard_v2 = keyboard_v2;
+     input_method_keyboard_modifiers (data,
+                                      &keyboard,
+-                                     serial,
++                                     key_serial,
+                                      mods_depressed,
+                                      mods_latched,
+                                      mods_locked,
+@@ -1875,7 +1882,7 @@ input_method_activate (void                               *data,
+ 
+     priv->context = context;
+     if (context)
+-        priv->serial = 0;
++        priv->im_serial = 0;
+ 
+     switch (priv->version) {
+     case INPUT_METHOD_V1:
+@@ -2088,9 +2095,26 @@ input_method_done_v2 (void                       *data,
+ 
+     g_return_if_fail (IBUS_IS_WAYLAND_IM (wlim));
+     priv = ibus_wayland_im_get_instance_private (wlim);
+-    priv->serial++;
++    priv->im_serial++;
+     input_method.u.input_method_v2 = input_method_v2;
+ 
++    /* Ghostty requires to receive the 'im_preedit_end' signal with
++     * zwp_input_method_v2_set_preedit_string() to recover the 'im_commit'
++     * signal but GtkIMContextWayland::text_input_preedit_apply() can emit
++     * the 'preedit-end' signal in case that
++     * GtkIMContextWayland->current_preedit.text is %NULL and it happens
++     * if zwp_text_input_v3_listener.done is emitted.
++     * To make sure zwp_text_input_v3_listener.done,
++     * zwp_input_method_v2_commit() is called after the im_serial is bumped.
++     */
++    if (priv->hiding_preedit_text &&
++        !priv->seat->pending_activate &&
++        priv->seat->active) {
++        zwp_input_method_v2_commit (priv->seat->input_method_v2,
++                                    priv->im_serial);
++        priv->hiding_preedit_text = FALSE;
++    }
++
+     if (priv->seat->pending_activate && !priv->seat->active) {
+         priv->seat->active = TRUE;
+         input_method_activate (data, &input_method, NULL);
+@@ -2169,7 +2193,7 @@ registry_handle_global (void               *data,
+                  interface, name, version);
+         fflush (priv->log);
+     }
+-    priv->serial = 0;
++    priv->im_serial = 0;
+     if (!g_strcmp0 (interface, zwp_input_method_manager_v2_interface.name)) {
+         priv->version = INPUT_METHOD_V2;
+         priv->input_method_manager_v2 =
+-- 
+2.52.0
+
+From 63bbe0b43408a1308be797cfab79c9d54bd1c144 Mon Sep 17 00:00:00 2001
+From: fujiwarat <takao.fujiwara1@gmail.com>
+Date: Thu, 8 Jan 2026 19:48:35 +0900
+Subject: [PATCH 1/2] ui/gtk3/extension: Fix assertion in panel_binding_construct()
+
+Check m_ibus in extension.vala:bus_name_acquired_cb().
+
+BUG=rhbz#1797120
+---
+ ui/gtk3/extension.vala | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/ui/gtk3/extension.vala b/ui/gtk3/extension.vala
+index 5cd1a6ad..3acd76ea 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();
+     }
+-- 
+2.52.0
+
+From e8628f50640567890e08d2e5fb0230e891bbe0fd Mon Sep 17 00:00:00 2001
+From: fujiwarat <takao.fujiwara1@gmail.com>
+Date: Thu, 8 Jan 2026 19:52:12 +0900
+Subject: [PATCH 2/2] ui/gtk3: Fix SEGV with double bus_name_acquired_cb()
+
+When PanelBinding() is called twice, g_dbus_connection_register_object()
+is failed in ibus_service_register() due to the duplicated object path
+and it calls unnecessary g_object_unref() although g_object_unref() is
+called in g_dbus_connection_register_object() and it causes a SEGV.
+
+But @user_data_free_func in g_dbus_connection_register_object() is not
+called with g_dbus_connection_unregister_object() immediately and I'd
+think not to use @user_data_free_func.
+
+BUG=rhbz#2419469
+---
+ src/ibusservice.c        | 18 ++++++++++++++++--
+ ui/gtk3/application.vala | 16 ++++++++++++++--
+ ui/gtk3/extension.vala   | 16 ++++++++++++++--
+ 3 files changed, 44 insertions(+), 6 deletions(-)
+
+diff --git a/src/ibusservice.c b/src/ibusservice.c
+index 51bd2ee4..3c7c04a4 100644
+--- a/src/ibusservice.c
++++ b/src/ibusservice.c
+@@ -2,7 +2,7 @@
+ /* vim:set et sts=4: */
+ /* ibus - The Input Bus
+  * Copyright (C) 2008-2015 Peng Huang <shawn.p.huang@gmail.com>
+- * Copyright (C) 2015-2023 Takao Fujiwara <takao.fujiwara1@gmail.com>
++ * Copyright (C) 2015-2026 Takao Fujiwara <takao.fujiwara1@gmail.com>
+  * Copyright (C) 2008-2019 Red Hat, Inc.
+  *
+  * This library is free software; you can redistribute it and/or
+@@ -495,9 +495,15 @@ ibus_service_unregister_cb (GDBusConnection    *connection,
+     guint *p = ids;
+     while (*p != 0) {
+         g_dbus_connection_unregister_object (connection, *p++);
++        /* g_dbus_connection_register_object(connection) calls
++         * g_object_ref(service).
++         */
++        g_object_unref (service);
+     }
+     g_signal_handlers_disconnect_by_func (connection,
+                     G_CALLBACK (ibus_service_connection_closed_cb), service);
++    /* g_hash_table_insert(service->priv->table) calls g_object_ref(connection)
++     */
+     g_object_unref (connection);
+     g_free (ids);
+ }
+@@ -566,12 +572,19 @@ ibus_service_register (IBusService     *service,
+ 
+     array = g_array_new (TRUE, TRUE, sizeof (guint));
+     while (*p != NULL) {
++        /* Probably I think @user_data_free_func in
++         * g_dbus_connection_register_object() is not useful in this case
++         * since the free func is not called until the @connection is closed
++         * but the @connection is shared with other instances
++         * so it would be better to call g_object_unref(service)
++         * after g_dbus_connection_unregister_object() is called.
++         */
+         guint id = g_dbus_connection_register_object (connection,
+                                                       service->priv->object_path,
+                                                       *p,
+                                                       &ibus_service_interface_vtable,
+                                                       g_object_ref (service),
+-                                                      (GDestroyNotify)g_object_unref,
++                                                      NULL,
+                                                       error);
+         if (id != 0) {
+             g_array_append_val (array, id);
+@@ -594,6 +607,7 @@ error_out:
+         guint *ids = (guint*) array->data;
+         while (*ids != 0) {
+             g_dbus_connection_unregister_object (connection, *ids++);
++            g_object_unref (service);
+         }
+         g_array_free (array, TRUE);
+     }
+diff --git a/ui/gtk3/application.vala b/ui/gtk3/application.vala
+index 65ab43cf..dcabc892 100644
+--- a/ui/gtk3/application.vala
++++ b/ui/gtk3/application.vala
+@@ -3,7 +3,7 @@
+  * ibus - The Input Bus
+  *
+  * Copyright(c) 2011 Peng Huang <shawn.p.huang@gmail.com>
+- * Copyright(c) 2017-2025 Takao Fujiwara <takao.fujiwara1@gmail.com>
++ * Copyright(c) 2017-2026 Takao Fujiwara <takao.fujiwara1@gmail.com>
+  *
+  * This library is free software; you can redistribute it and/or
+  * modify it under the terms of the GNU Lesser General Public
+@@ -98,6 +98,16 @@ class Application {
+                                       string         signal_name,
+                                       Variant        parameters) {
+         debug("signal_name = %s", signal_name);
++        if (m_panel != null) {
++            // ibus_object_destroy() is needed because g_object_unref() is
++            // called by ibus_service_unregister_cb() but another
++            // g_object_unref() is also called by g_object_run_dispose()
++            // and one g_object_unref() is not needed because Vala calls it
++            // with `m_panel = null`.
++            m_panel.ref();
++            ((IBus.Object)m_panel).destroy();
++            m_panel.disconnect_signals();
++        }
+         m_panel = new Panel(bus, m_enable_wayland_im);
+         if (m_log != null)
+             m_panel.set_log(m_log, m_verbose);
+@@ -128,7 +138,8 @@ class Application {
+         // g_dbus_connection_register_object()
+         debug("signal_name = %s", signal_name);
+ 
+-        // unref m_panel
++        m_panel.ref();
++        ((IBus.Object)m_panel).destroy();
+         m_panel.disconnect_signals();
+ #if USE_GDK_WAYLAND
+         if (m_realize_surface_id != 0) {
+@@ -144,6 +155,7 @@ class Application {
+             m_ibus_focus_out_id = 0;
+         }
+ #endif
++        // unref m_panel
+         m_panel = null;
+     }
+ 
+diff --git a/ui/gtk3/extension.vala b/ui/gtk3/extension.vala
+index 3acd76ea..7ee54cd3 100644
+--- a/ui/gtk3/extension.vala
++++ b/ui/gtk3/extension.vala
+@@ -3,7 +3,7 @@
+  * ibus - The Input Bus
+  *
+  * Copyright(c) 2018 Peng Huang <shawn.p.huang@gmail.com>
+- * Copyright(c) 2018-2025 Takao Fujiwara <takao.fujiwara1@gmail.com>
++ * Copyright(c) 2018-2026 Takao Fujiwara <takao.fujiwara1@gmail.com>
+  *
+  * This library is free software; you can redistribute it and/or
+  * modify it under the terms of the GNU Lesser General Public
+@@ -77,6 +77,16 @@ class ExtensionGtk : Gtk.Application {
+          * panel_binding_construct()
+          */
+         return_if_fail(m_bus.is_connected());
++        if (m_panel != null) {
++            // ibus_object_destroy() is needed because g_object_unref() is
++            // called by ibus_service_unregister_cb() but another
++            // g_object_unref() is also called by g_object_run_dispose()
++            // and one g_object_unref() is not needed because Vala calls it
++            // with `m_panel = null`.
++            m_panel.ref();
++            ((IBus.Object)m_panel).destroy();
++            m_panel.disconnect_signals();
++        }
+         m_panel = new PanelBinding(m_bus, this);
+         m_panel.load_settings();
+     }
+@@ -95,8 +105,10 @@ class ExtensionGtk : Gtk.Application {
+         // g_dbus_connection_register_object()
+         debug("signal_name = %s", signal_name);
+ 
+-        // unref m_panel
++        m_panel.ref();
++        ((IBus.Object)m_panel).destroy();
+         m_panel.disconnect_signals();
++        // unref m_panel
+         m_panel = null;
+     }
+ 
+-- 
+2.52.0
+

diff --git a/ibus.spec b/ibus.spec
index bc9a1f8..88e58a7 100644
--- a/ibus.spec
+++ b/ibus.spec
@@ -22,11 +22,11 @@
 
 %global ibus_xinit_condition (%pcd1 or %pcd2 or %pcd3)
 # FIXME: How to write a condition with multiple lines
-%global ibus_panel_condition (%pcd1 or %pcd2 or %pcd3 or %pcd4)
+%global ibus_panel_condition (%pcd1 or %pcd2 or %pcd3 or %wcd1)
 %global pcd1 budgie-desktop or cinnamon or deepin-desktop or i3
-%global pcd2 lxqt-session or lxsession or mate-panel or phosh
+%global pcd2 lxqt-x11-session or lxsession or mate-panel or phosh or awesome
 %global pcd3 plasma-workspace or sugar or xfce4-session
-%global pcd4 cosmic-panel or hyprland or sway or waybar
+%global wcd1 cosmic-panel or hyprland or sway or waybar or lxqt-wayland-session
 
 %if %with_pkg_config
 %if %{with gtk2}
@@ -53,7 +53,7 @@
 Name:           ibus
 Version:        1.5.34~alpha1
 # https://github.com/fedora-infra/rpmautospec/issues/101
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        Intelligent Input Bus for Linux OS
 License:        LGPL-2.1-or-later
 URL:            https://github.com/ibus/%name/wiki
@@ -110,13 +110,9 @@ Requires:       python3-ibus           = %{version}-%{release}
 Recommends:     %{name}-setup          = %{version}-%{release}
 
 Requires:       iso-codes
-Requires:       dconf
 # rpmlint asks to delete librsvg2
 #Requires:       librsvg2
 
-Requires:               desktop-file-utils
-Requires(post):         desktop-file-utils
-Requires(postun):       desktop-file-utils
 Requires:               dconf
 Requires(postun):       dconf
 Requires(posttrans):    dconf
@@ -579,6 +575,15 @@ dconf update || :
 %{_datadir}/installed-tests/ibus
 
 %changelog
+* Fri Jan 09 2026 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.34~alpha1-4
+- Resolves: #2419469 Fix SEGV with double bus_name_acquired_cb()
+- Resolves: #2424256 Delete Requires desktop-file-utils in spec
+- Resolves: #2425585 Separate lxqt-wayland-session and lxqt-x11-session in spec
+- Resolves: #2428238 Add awesome in spec
+- Rebase: #1797120 Fix assertion in panel_binding_construct()
+- Connect delete surrounding text in ibus-wayland
+- Fix Backspace after commit-text in Ghostty in ibus-wayland
+
 * Sun Dec 21 2025 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.34~alpha1-3
 - Resolves: #2321990#c10 Keep xinit postun in ibus for back compatibility
 - Resolves: #2418564 Do not install ibus-xinit in COSMIC desktop

                 reply	other threads:[~2026-05-31  2:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178019334830.1.16467660454623119513.rpms-ibus-41fe4ec09aed@fedoraproject.org \
    --to=tfujiwar@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox