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: Send FocusIn signal again after delayed FocusId property
Date: Sun, 31 May 2026 02:08:52 GMT	[thread overview]
Message-ID: <178019333234.1.10508852534383023587.rpms-ibus-da89bad8895f@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/ibus
Branch : autotool
Commit : da89bad8895f26a0225096fb1809b1b36cce92d6
Author : Takao Fujiwara <tfujiwar@redhat.com>
Date   : 2025-03-06T13:15:34+09:00
Stats  : +128/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/ibus/c/da89bad8895f26a0225096fb1809b1b36cce92d6?branch=autotool

Log:
Send FocusIn signal again after delayed FocusId property

---
diff --git a/ibus-HEAD.patch b/ibus-HEAD.patch
index e69de29..4a5a56a 100644
--- a/ibus-HEAD.patch
+++ b/ibus-HEAD.patch
@@ -0,0 +1,120 @@
+From 646cf459902c35268901a8713cd7cd88a4cf7cf9 Mon Sep 17 00:00:00 2001
+From: fujiwarat <takao.fujiwara1@gmail.com>
+Date: Wed, 5 Mar 2025 08:41:34 +0900
+Subject: [PATCH] client/gtk2: Revert "Add a pad to the cursor height in Wayland"
+
+Fix the regression in gnome-shell.
+
+BUG=https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8228
+Fixes: https://github.com/ibus/ibus/commit/c38d82f
+---
+ client/gtk2/ibusimcontext.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/client/gtk2/ibusimcontext.c b/client/gtk2/ibusimcontext.c
+index a45aae92..266fa6fe 100644
+--- a/client/gtk2/ibusimcontext.c
++++ b/client/gtk2/ibusimcontext.c
+@@ -1693,14 +1693,12 @@ _set_cursor_location_internal (IBusIMContext *ibusimcontext)
+ #endif
+ 
+     if (GDK_IS_WAYLAND_DISPLAY (display)) {
+-        area.y += area.height / 2;
+         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,
+-- 
+2.47.0
+
+From 1b7e94cab80d6500ecfaeea8c8b7efe373763431 Mon Sep 17 00:00:00 2001
+From: fujiwarat <takao.fujiwara1@gmail.com>
+Date: Thu, 6 Mar 2025 11:46:11 +0900
+Subject: [PATCH] bus: Send FocusIn signal again after delayed FocusId property
+
+The FocusId D-Bus property is checked after both bus/EngineProxy
+and src/IBusEngine is generated with an idle then the first
+FocusIn D-Bus signal is sent without checking the FocusId property
+when ibus-daemon runs.
+The solution is to send the FocusIn signal again in case the
+FocusId property is TRUE.
+
+BUG=https://github.com/ibus/ibus/pull/2717
+---
+ bus/engineproxy.c | 24 ++++++++++++++++++++++--
+ 1 file changed, 22 insertions(+), 2 deletions(-)
+
+diff --git a/bus/engineproxy.c b/bus/engineproxy.c
+index 20f89cef..dd2bf2af 100644
+--- a/bus/engineproxy.c
++++ b/bus/engineproxy.c
+@@ -2,7 +2,7 @@
+ /* vim:set et sts=4: */
+ /* ibus - The Input Bus
+  * Copyright (C) 2008-2013 Peng Huang <shawn.p.huang@gmail.com>
+- * Copyright (C) 2015-2022 Takao Fujiwara <takao.fujiwara1@gmail.com>
++ * Copyright (C) 2015-2025 Takao Fujiwara <takao.fujiwara1@gmail.com>
+  * Copyright (C) 2008-2016 Red Hat, Inc.
+  *
+  * This library is free software; you can redistribute it and/or
+@@ -61,6 +61,8 @@ struct _BusEngineProxy {
+     IBusPropList *prop_list;
+     gboolean has_focus_id;
+     gboolean has_active_surrounding_text;
++    gchar *object_path;
++    gchar *client;
+ };
+ 
+ struct _BusEngineProxyClass {
+@@ -1436,6 +1438,18 @@ _get_active_surrounding_text_cb (GObject        *object,
+             hash_table,
+             (gpointer)ibus_engine_desc_get_name (engine->desc),
+             value);
++        if (engine->has_focus_id && engine->object_path) {
++            gchar *object_path = g_strdup (engine->object_path);
++            gchar *client = g_strdup (engine->client);
++
++            engine->has_focus = FALSE;
++            /* Send the FocusIn D-Bus signal again after the delayed FocusId
++             * D-Bus property.
++             */
++            bus_engine_proxy_focus_in (engine, object_path, client);
++            g_free (object_path);
++            g_free (client);
++        }
+     }
+     g_hash_table_unref (hash_table);
+ }
+@@ -1479,9 +1493,13 @@ bus_engine_proxy_focus_in (BusEngineProxy *engine,
+                            const gchar    *client)
+ {
+     g_assert (BUS_IS_ENGINE_PROXY (engine));
+-    if (engine->has_focus)
++    if (engine->has_focus && !g_strcmp0 (object_path, engine->object_path))
+         return;
+     engine->has_focus = TRUE;
++    g_free (engine->object_path);
++    g_free (engine->client);
++    engine->object_path = g_strdup (object_path);
++    engine->client = g_strdup (client);
+     if (engine->has_active_surrounding_text)
+         g_signal_emit (engine, engine_signals[REQUIRE_SURROUNDING_TEXT], 0);
+     if (engine->has_focus_id) {
+@@ -1513,6 +1531,8 @@ bus_engine_proxy_focus_out (BusEngineProxy *engine,
+     if (!engine->has_focus)
+         return;
+     engine->has_focus = FALSE;
++    g_clear_pointer (&engine->object_path, g_free);
++    g_clear_pointer (&engine->client, g_free);
+     if (engine->has_focus_id) {
+         g_dbus_proxy_call ((GDBusProxy *)engine,
+                            "FocusOutId",
+-- 
+2.47.0
+

diff --git a/ibus.spec b/ibus.spec
index b60c53f..e98b80e 100644
--- a/ibus.spec
+++ b/ibus.spec
@@ -63,7 +63,7 @@
 Name:           ibus
 Version:        1.5.32~rc1
 # https://github.com/fedora-infra/rpmautospec/issues/101
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Intelligent Input Bus for Linux OS
 License:        LGPL-2.1-or-later
 URL:            https://github.com/ibus/%name/wiki
@@ -72,6 +72,7 @@ Source1:        https://github.com/ibus/%name/releases/download/%{source_version
 Source2:        %{name}-xinput
 Source3:        %{name}.conf.5
 # Patch0:         %%{name}-HEAD.patch
+Patch0:         %{name}-HEAD.patch
 # Under testing #1349148 #1385349 #1350291 #1406699 #1432252 #1601577
 Patch1:         %{name}-1385349-segv-bus-proxy.patch
 
@@ -336,6 +337,8 @@ fi
 # 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
@@ -635,6 +638,10 @@ dconf update || :
 %{_datadir}/installed-tests/ibus
 
 %changelog
+* Thu Mar 06 2025 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.32~rc1-2
+- Send FocusIn signal again after delayed FocusId property
+- Revert "Add a pad to the cursor height in Wayland"
+
 * Thu Feb 27 2025 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.32~rc1-1
 - Use gdk_init() instead of gtk_init() in ibus-x11
 - Revert "Do not load en-US compose table by default"

                 reply	other threads:[~2026-05-31  2:08 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=178019333234.1.10508852534383023587.rpms-ibus-da89bad8895f@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