Accepting request 999524 from M17N
OBS-URL: https://build.opensuse.org/request/show/999524 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ibus?expand=0&rev=117
This commit is contained in:
commit
b359fcb337
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5c2fd118e7bfd4e9a42c3a20e6175a263426c90b6256f94989ed3d0384f4c9fc
|
||||
size 3715263
|
3
ibus-1.5.27.tar.gz
Normal file
3
ibus-1.5.27.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6efbda5adb96f607cf7108d1e270962c0729a59c9ea6d58eea2dde0e3cbb97df
|
||||
size 3779541
|
@ -1,267 +0,0 @@
|
||||
From 17648f0522910480b6c5dd4f5356ca1f6c160bf5 Mon Sep 17 00:00:00 2001
|
||||
From: Carlos Garnacho <carlosg@gnome.org>
|
||||
Date: Tue, 29 Mar 2022 22:48:19 +0200
|
||||
Subject: [PATCH] src: Fix refcounting issues
|
||||
|
||||
Commit 5a455b1ead attempted to fix both GLib warnings around
|
||||
floating references and other presumed refcounting issues. However
|
||||
it missed 2 kinds of bugs:
|
||||
|
||||
- The places that take an IBusText created from a static string
|
||||
were made to avoid freeing it afterwards, but the staticness refers
|
||||
to the string content, not the object itself.
|
||||
- The places that are documented to emit signals on floating object
|
||||
references used to do the following after signal emission:
|
||||
|
||||
if (g_object_is_floating (object))
|
||||
g_object_unref (object)
|
||||
|
||||
And did possibly trigger GLib warnings were changed to:
|
||||
|
||||
if (g_object_is_floating (object))
|
||||
g_object_sink_ref (object);
|
||||
g_object_unref (object);
|
||||
|
||||
Which fixes the GLib warning for floating references, but do
|
||||
unintendedly steal one reference away for non floating references.
|
||||
|
||||
This commit is essentially a revert of commit 5a455b1ead, but
|
||||
addressing both things differently:
|
||||
|
||||
- All label/tooltip/symbol IBusText properties in IBusProperty do
|
||||
now always sink the reference of the stored object.
|
||||
|
||||
- All places documented as maybe using objects with a floating reference
|
||||
on signals changed to doing:
|
||||
|
||||
if (g_object_is_floating (object)) {
|
||||
g_object_ref_sink (object);
|
||||
g_object_unref (object);
|
||||
}
|
||||
|
||||
So the floating reference is owned and unreferenced without warnings,
|
||||
but already owned references are left unchanged.
|
||||
|
||||
This addresses the possible GLib warnings, fixes the possible double
|
||||
unrefs happening on IBusText used in signals, and fixes the missing
|
||||
unrefs on IBusText objects created from static strings.
|
||||
|
||||
BUG=https://github.com/ibus/ibus/issues/2393
|
||||
BUG=https://github.com/ibus/ibus/issues/2387
|
||||
---
|
||||
src/ibusinputcontext.c | 35 +++++++++++++++++++++--------------
|
||||
src/ibusproperty.c | 32 +++++++++++++++++---------------
|
||||
2 files changed, 38 insertions(+), 29 deletions(-)
|
||||
|
||||
diff --git a/src/ibusinputcontext.c b/src/ibusinputcontext.c
|
||||
index 4b27551bd..7981de381 100644
|
||||
--- a/src/ibusinputcontext.c
|
||||
+++ b/src/ibusinputcontext.c
|
||||
@@ -549,9 +549,10 @@ ibus_input_context_g_signal (GDBusProxy *proxy,
|
||||
g_variant_unref (variant);
|
||||
g_signal_emit (context, context_signals[COMMIT_TEXT], 0, text);
|
||||
|
||||
- if (g_object_is_floating (text))
|
||||
+ if (g_object_is_floating (text)) {
|
||||
g_object_ref_sink (text);
|
||||
- g_object_unref (text);
|
||||
+ g_object_unref (text);
|
||||
+ }
|
||||
return;
|
||||
}
|
||||
if (g_strcmp0 (signal_name, "UpdatePreeditText") == 0) {
|
||||
@@ -569,9 +570,10 @@ ibus_input_context_g_signal (GDBusProxy *proxy,
|
||||
cursor_pos,
|
||||
visible);
|
||||
|
||||
- if (g_object_is_floating (text))
|
||||
+ if (g_object_is_floating (text)) {
|
||||
g_object_ref_sink (text);
|
||||
- g_object_unref (text);
|
||||
+ g_object_unref (text);
|
||||
+ }
|
||||
return;
|
||||
}
|
||||
if (g_strcmp0 (signal_name, "UpdatePreeditTextWithMode") == 0) {
|
||||
@@ -592,9 +594,10 @@ ibus_input_context_g_signal (GDBusProxy *proxy,
|
||||
visible,
|
||||
mode);
|
||||
|
||||
- if (g_object_is_floating (text))
|
||||
+ if (g_object_is_floating (text)) {
|
||||
g_object_ref_sink (text);
|
||||
- g_object_unref (text);
|
||||
+ g_object_unref (text);
|
||||
+ }
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -621,9 +624,10 @@ ibus_input_context_g_signal (GDBusProxy *proxy,
|
||||
0,
|
||||
text,
|
||||
visible);
|
||||
- if (g_object_is_floating (text))
|
||||
+ if (g_object_is_floating (text)) {
|
||||
g_object_ref_sink (text);
|
||||
- g_object_unref (text);
|
||||
+ g_object_unref (text);
|
||||
+ }
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -640,9 +644,10 @@ ibus_input_context_g_signal (GDBusProxy *proxy,
|
||||
0,
|
||||
table,
|
||||
visible);
|
||||
- if (g_object_is_floating (table))
|
||||
+ if (g_object_is_floating (table)) {
|
||||
g_object_ref_sink (table);
|
||||
- g_object_unref (table);
|
||||
+ g_object_unref (table);
|
||||
+ }
|
||||
return;
|
||||
|
||||
}
|
||||
@@ -659,9 +664,10 @@ ibus_input_context_g_signal (GDBusProxy *proxy,
|
||||
0,
|
||||
prop_list);
|
||||
|
||||
- if (g_object_is_floating (prop_list))
|
||||
+ if (g_object_is_floating (prop_list)) {
|
||||
g_object_ref_sink (prop_list);
|
||||
- g_object_unref (prop_list);
|
||||
+ g_object_unref (prop_list);
|
||||
+ }
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -673,9 +679,10 @@ ibus_input_context_g_signal (GDBusProxy *proxy,
|
||||
|
||||
g_signal_emit (context, context_signals[UPDATE_PROPERTY], 0, prop);
|
||||
|
||||
- if (g_object_is_floating (prop))
|
||||
+ if (g_object_is_floating (prop)) {
|
||||
g_object_ref_sink (prop);
|
||||
- g_object_unref (prop);
|
||||
+ g_object_unref (prop);
|
||||
+ }
|
||||
return;
|
||||
}
|
||||
|
||||
diff --git a/src/ibusproperty.c b/src/ibusproperty.c
|
||||
index 6d4ed088e..cd8a0e2a6 100644
|
||||
--- a/src/ibusproperty.c
|
||||
+++ b/src/ibusproperty.c
|
||||
@@ -336,20 +336,17 @@ ibus_property_destroy (IBusProperty *prop)
|
||||
prop->priv->icon = NULL;
|
||||
|
||||
if (prop->priv->label) {
|
||||
- if (!ibus_text_get_is_static (prop->priv->label))
|
||||
- g_object_unref (prop->priv->label);
|
||||
+ g_object_unref (prop->priv->label);
|
||||
prop->priv->label = NULL;
|
||||
}
|
||||
|
||||
if (prop->priv->symbol) {
|
||||
- if (!ibus_text_get_is_static (prop->priv->symbol))
|
||||
- g_object_unref (prop->priv->symbol);
|
||||
+ g_object_unref (prop->priv->symbol);
|
||||
prop->priv->symbol = NULL;
|
||||
}
|
||||
|
||||
if (prop->priv->tooltip) {
|
||||
- if (!ibus_text_get_is_static (prop->priv->tooltip))
|
||||
- g_object_unref (prop->priv->tooltip);
|
||||
+ g_object_unref (prop->priv->tooltip);
|
||||
prop->priv->tooltip = NULL;
|
||||
}
|
||||
|
||||
@@ -404,7 +401,7 @@ ibus_property_deserialize (IBusProperty *prop,
|
||||
g_variant_get_child (variant, retval++, "u", &prop->priv->type);
|
||||
|
||||
GVariant *subvar = g_variant_get_child_value (variant, retval++);
|
||||
- if (prop->priv->label && !ibus_text_get_is_static (prop->priv->label)) {
|
||||
+ if (prop->priv->label) {
|
||||
g_object_unref (prop->priv->label);
|
||||
}
|
||||
prop->priv->label = IBUS_TEXT (ibus_serializable_deserialize (subvar));
|
||||
@@ -414,7 +411,7 @@ ibus_property_deserialize (IBusProperty *prop,
|
||||
ibus_g_variant_get_child_string (variant, retval++, &prop->priv->icon);
|
||||
|
||||
subvar = g_variant_get_child_value (variant, retval++);
|
||||
- if (prop->priv->tooltip && !ibus_text_get_is_static (prop->priv->tooltip)) {
|
||||
+ if (prop->priv->tooltip) {
|
||||
g_object_unref (prop->priv->tooltip);
|
||||
}
|
||||
prop->priv->tooltip = IBUS_TEXT (ibus_serializable_deserialize (subvar));
|
||||
@@ -435,7 +432,7 @@ ibus_property_deserialize (IBusProperty *prop,
|
||||
|
||||
/* Keep the serialized order for the compatibility when add new members. */
|
||||
subvar = g_variant_get_child_value (variant, retval++);
|
||||
- if (prop->priv->symbol && !ibus_text_get_is_static (prop->priv->symbol)) {
|
||||
+ if (prop->priv->symbol) {
|
||||
g_object_unref (prop->priv->symbol);
|
||||
}
|
||||
prop->priv->symbol = IBUS_TEXT (ibus_serializable_deserialize (subvar));
|
||||
@@ -567,7 +564,7 @@ ibus_property_set_label (IBusProperty *prop,
|
||||
g_assert (IBUS_IS_PROPERTY (prop));
|
||||
g_return_if_fail (label == NULL || IBUS_IS_TEXT (label));
|
||||
|
||||
- if (prop->priv->label && !ibus_text_get_is_static (prop->priv->label)) {
|
||||
+ if (prop->priv->label) {
|
||||
g_object_unref (prop->priv->label);
|
||||
}
|
||||
|
||||
@@ -575,8 +572,10 @@ ibus_property_set_label (IBusProperty *prop,
|
||||
prop->priv->label = ibus_text_new_from_static_string ("");
|
||||
}
|
||||
else {
|
||||
- prop->priv->label = g_object_ref_sink (label);
|
||||
+ prop->priv->label = label;
|
||||
}
|
||||
+
|
||||
+ g_object_ref_sink (prop->priv->label);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -586,7 +585,7 @@ ibus_property_set_symbol (IBusProperty *prop,
|
||||
g_assert (IBUS_IS_PROPERTY (prop));
|
||||
g_return_if_fail (symbol == NULL || IBUS_IS_TEXT (symbol));
|
||||
|
||||
- if (prop->priv->symbol && !ibus_text_get_is_static (prop->priv->symbol)) {
|
||||
+ if (prop->priv->symbol) {
|
||||
g_object_unref (prop->priv->symbol);
|
||||
}
|
||||
|
||||
@@ -594,8 +593,10 @@ ibus_property_set_symbol (IBusProperty *prop,
|
||||
prop->priv->symbol = ibus_text_new_from_static_string ("");
|
||||
}
|
||||
else {
|
||||
- prop->priv->symbol = g_object_ref_sink (symbol);
|
||||
+ prop->priv->symbol = symbol;
|
||||
}
|
||||
+
|
||||
+ g_object_ref_sink (prop->priv->symbol);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -615,7 +616,7 @@ ibus_property_set_tooltip (IBusProperty *prop,
|
||||
g_assert (IBUS_IS_PROPERTY (prop));
|
||||
g_assert (tooltip == NULL || IBUS_IS_TEXT (tooltip));
|
||||
|
||||
- if (prop->priv->tooltip && !ibus_text_get_is_static (prop->priv->tooltip)) {
|
||||
+ if (prop->priv->tooltip) {
|
||||
g_object_unref (prop->priv->tooltip);
|
||||
}
|
||||
|
||||
@@ -624,8 +625,9 @@ ibus_property_set_tooltip (IBusProperty *prop,
|
||||
}
|
||||
else {
|
||||
prop->priv->tooltip = tooltip;
|
||||
- g_object_ref_sink (prop->priv->tooltip);
|
||||
}
|
||||
+
|
||||
+ g_object_ref_sink (prop->priv->tooltip);
|
||||
}
|
||||
|
||||
void
|
26
ibus.changes
26
ibus.changes
@ -1,3 +1,29 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Aug 27 03:24:19 UTC 2022 - Fuminobu Takeyama <ftake@geeko.jp> - 1.5.27
|
||||
|
||||
- Upstream update to 1.5.27
|
||||
* Disable XKB engines in Plasma Wayland
|
||||
* ibusimcontext keycode - 8 for gtk3 keycode generation
|
||||
* client/gtk2: Revert CCedilla change for pt-BR
|
||||
* Add IBUS_CAP_OSK to IBusCapabilite
|
||||
* Enable ibus restart in GNOME desktop
|
||||
* Add ibus im-module command
|
||||
* Implement new process_key_event for GTK4
|
||||
* src/ibusengine: Add focus_in_id()/focus_out_id() class methods
|
||||
* Delete xkb:latam:: in denylist.txt
|
||||
* Enhance Xutf8TextListToTextProperty
|
||||
* Revert Emoji shoftcut key to Super-space
|
||||
* Update simple.xml with xkeyboard-config 2.36
|
||||
* Fix refcounting issues
|
||||
* Drop ibus-fix-refcounting-issues.patch
|
||||
* Fix bashisms in org.freedesktop.IBus.session.GNOME.service
|
||||
* Update xkb-latin-layouts in gschema
|
||||
* Use our own prefix to look up systemd user services dir
|
||||
* Add functionality to change IBus panel themes with available GTK themes
|
||||
* Update translation
|
||||
- Refresh im-engines-precede-xkb.patch
|
||||
- Add pkgconfig(libnotify) for the GTK4 flavor
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 22 13:37:53 UTC 2022 - Fuminobu Takeyama <ftake@geeko.jp>
|
||||
|
||||
|
10
ibus.spec
10
ibus.spec
@ -35,7 +35,7 @@
|
||||
|
||||
%define _name ibus
|
||||
Name: %{_name}%{?nsuffix}
|
||||
Version: 1.5.26
|
||||
Version: 1.5.27
|
||||
Release: 0
|
||||
Summary: The "Intelligent Input Bus" input method
|
||||
License: LGPL-2.1-or-later
|
||||
@ -53,7 +53,7 @@ Source99: baselibs.conf
|
||||
# Fix lost XIM input after screenlock
|
||||
Patch4: ibus-xim-fix-re-focus-after-lock.patch
|
||||
# PATCH-FIX-UPSTREAM ftake@geeko.jp
|
||||
# Select an IM engine at the first login
|
||||
# Select an IM engine instead of xkb engine at the first login
|
||||
Patch8: im-engines-precede-xkb.patch
|
||||
# PATCH-FIX-OPENSUSE ibus-fix-Signal-does-not-exist.patch hillwood@opensuse.org
|
||||
# panel.vala: The name `Signal' does not exist in the context of `Posix' in Leap 15.1 and below
|
||||
@ -72,10 +72,8 @@ Patch12: ibus-disable-engines-preload-in-GNOME.patch
|
||||
# Qt5 does not be update to the new version and patch for ibus on Leap 15,
|
||||
# it still needs this patch on leap 15. (boo#1187202)
|
||||
Patch15: ibus-socket-name-compatibility.patch
|
||||
# PATCH-FIX-UPSTREAM ibus-fix-refcounting-issues.patch gh#ibus/ibus#2387, gh#ibus/ibus#2393 yfjiang@suse.com
|
||||
# Fix refcounting issues and address possible glib warnings
|
||||
Patch16: ibus-fix-refcounting-issues.patch
|
||||
BuildRequires: pkgconfig(iso-codes)
|
||||
BuildRequires: pkgconfig(libnotify)
|
||||
BuildRequires: pkgconfig(systemd)
|
||||
%if ! 0%{?with_gtk4}
|
||||
BuildRequires: fdupes
|
||||
@ -99,7 +97,6 @@ BuildRequires: vala >= 0.31.1
|
||||
BuildRequires: systemd-rpm-macros
|
||||
BuildRequires: x11-tools
|
||||
BuildRequires: pkgconfig(json-glib-1.0)
|
||||
BuildRequires: pkgconfig(libnotify)
|
||||
BuildRequires: pkgconfig(vapigen)
|
||||
BuildRequires: pkgconfig(xkbcommon)
|
||||
%if %{with_emoji}
|
||||
@ -232,7 +229,6 @@ cp -r %{SOURCE11} .
|
||||
%if 0%{?suse_version} <= 1500
|
||||
%patch15 -p1
|
||||
%endif
|
||||
%patch16 -p1
|
||||
|
||||
%build
|
||||
%configure --disable-static \
|
||||
|
@ -1,24 +1,14 @@
|
||||
commit 389d179c0b15664e23af2f26c17b3b5f316bc4e5
|
||||
Author: Fuminobu TAKEYAMA <ftake@geeko.jp>
|
||||
Date: Tue Oct 7 20:23:42 2014 +0900
|
||||
|
||||
make IM engines precede xkb engines so that users can input
|
||||
CJK letters without switching IMs at the first login
|
||||
|
||||
diff --git a/ui/gtk3/panel.vala b/ui/gtk3/panel.vala
|
||||
index 76cea23..1ff56fb 100644
|
||||
--- a/ui/gtk3/panel.vala
|
||||
+++ b/ui/gtk3/panel.vala
|
||||
@@ -411,10 +411,10 @@ class Panel : IBus.PanelService {
|
||||
get_engines_from_locale(engines);
|
||||
--- ibus-1.5.27/ui/gtk3/panel.vala.org 2022-08-23 00:32:16.000000000 +0900
|
||||
+++ ibus-1.5.27/ui/gtk3/panel.vala 2022-08-27 11:48:21.086332809 +0900
|
||||
@@ -589,9 +589,9 @@
|
||||
}
|
||||
|
||||
string[] names = {};
|
||||
- foreach (unowned IBus.EngineDesc engine in xkb_engines)
|
||||
- names += engine.get_name();
|
||||
foreach (unowned IBus.EngineDesc engine in im_engines)
|
||||
names += engine.get_name();
|
||||
+ names += engine.get_name();
|
||||
+ foreach (unowned IBus.EngineDesc engine in xkb_engines)
|
||||
+ names += engine.get_name();
|
||||
names += engine.get_name();
|
||||
|
||||
m_settings_general.set_strv("preload-engines", names);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user