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: Update ibus_input_context_set_surrounding_text for a global IC
Date: Sun, 31 May 2026 02:07:59 GMT [thread overview]
Message-ID: <178019327951.1.8331728235187518137.rpms-ibus-3e0a79049c17@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/ibus
Branch : autotool
Commit : 3e0a79049c17e566530605eb002628a5c98af4c3
Author : Takao Fujiwara <tfujiwar@redhat.com>
Date : 2022-09-19T14:02:53+09:00
Stats : +24/-24 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/ibus/c/3e0a79049c17e566530605eb002628a5c98af4c3?branch=autotool
Log:
Update ibus_input_context_set_surrounding_text for a global IC
Also fix CI
---
diff --git a/ibus-HEAD.patch b/ibus-HEAD.patch
index 798101a..f886852 100644
--- a/ibus-HEAD.patch
+++ b/ibus-HEAD.patch
@@ -131,9 +131,9 @@ index 3fc9c0f2..eaf7eb90 100644
--
2.37.3
-From 483abb429fed4c51e214fa6c1efbb54ca73d5b28 Mon Sep 17 00:00:00 2001
+From 7bbcce66e1ca694b7a62553327161290bf4ee283 Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
-Date: Fri, 16 Sep 2022 14:50:53 +0900
+Date: Mon, 19 Sep 2022 11:52:14 +0900
Subject: [PATCH] client/gtk2: Update surrounding text properties by focus in
ibus_input_context_set_surrounding_text() should be succeeded
@@ -148,8 +148,8 @@ and clients can call set_surrounding_text() later.
BUG=https://github.com/ibus/ibus/issues/2423
---
client/gtk2/ibusimcontext.c | 25 +++++++++++++++++++++++++
- src/ibusinputcontext.c | 24 ++++++++++++++++++++++--
- 2 files changed, 47 insertions(+), 2 deletions(-)
+ src/ibusinputcontext.c | 29 ++++++++++++++++++++++++++++-
+ 2 files changed, 53 insertions(+), 1 deletion(-)
diff --git a/client/gtk2/ibusimcontext.c b/client/gtk2/ibusimcontext.c
index eaf7eb90..6e338157 100644
@@ -216,7 +216,7 @@ index eaf7eb90..6e338157 100644
if (!g_queue_is_empty (ibusimcontext->events_queue)) {
diff --git a/src/ibusinputcontext.c b/src/ibusinputcontext.c
-index 7981de38..ed887dde 100644
+index 7981de38..28ae04ad 100644
--- a/src/ibusinputcontext.c
+++ b/src/ibusinputcontext.c
@@ -2,7 +2,7 @@
@@ -266,30 +266,26 @@ index 7981de38..ed887dde 100644
return;
}
-@@ -1109,6 +1126,7 @@ ibus_input_context_set_surrounding_text (IBusInputContext *context,
- guint32 cursor_pos,
- guint32 anchor_pos)
- {
-+ static IBusInputContext *prev_context = NULL;
- IBusInputContextPrivate *priv;
+@@ -1116,9 +1133,19 @@ ibus_input_context_set_surrounding_text (IBusInputContext *context,
+
+ priv = IBUS_INPUT_CONTEXT_GET_PRIVATE (context);
- g_assert (IBUS_IS_INPUT_CONTEXT (context));
-@@ -1119,12 +1137,14 @@ ibus_input_context_set_surrounding_text (IBusInputContext *context,
++ /* This API should send "SetSurroundingText" D-Bus method when
++ * input contexts are switched between tabs in a text application
++ * so that engines can receive the updated surrounding texts after
++ * focus-in events happen.
++ *
++ * GNOME shell uses a single input context and the address of the input
++ * contexts are always same. So check the address of texts if the input
++ * contexts on applications are switched.
++ */
if (cursor_pos != priv->surrounding_cursor_pos ||
anchor_pos != priv->selection_anchor_pos ||
priv->surrounding_text == NULL ||
-- g_strcmp0 (text->text, priv->surrounding_text->text) != 0) {
-+ g_strcmp0 (text->text, priv->surrounding_text->text) != 0 ||
-+ context != prev_context) {
++ text != priv->surrounding_text ||
+ g_strcmp0 (text->text, priv->surrounding_text->text) != 0) {
if (priv->surrounding_text)
g_object_unref (priv->surrounding_text);
- priv->surrounding_text = (IBusText *) g_object_ref_sink (text);
- priv->surrounding_cursor_pos = cursor_pos;
- priv->selection_anchor_pos = anchor_pos;
-+ prev_context = context;
-
- if (priv->needs_surrounding_text) {
- GVariant *variant = ibus_serializable_serialize ((IBusSerializable *)text);
--
2.37.3
diff --git a/ibus.spec b/ibus.spec
index 3a7db6b..64e04bb 100644
--- a/ibus.spec
+++ b/ibus.spec
@@ -39,7 +39,7 @@
Name: ibus
Version: 1.5.27
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Intelligent Input Bus for Linux OS
License: LGPLv2+
URL: https://github.com/ibus/%name/wiki
@@ -521,6 +521,10 @@ dconf update || :
%{_datadir}/installed-tests/ibus
%changelog
+* Mon Sep 19 2022 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.27-3
+- Update ibus_input_context_set_surrounding_text for a global IC
+- Fix CI
+
* Fri Sep 16 2022 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.27-2
- Resolves: #2093313 Stop many warnings of surrounding text
- Fix other surrounding text issues
reply other threads:[~2026-05-31 2:07 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=178019327951.1.8331728235187518137.rpms-ibus-3e0a79049c17@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