Add some new features

- Add IBUS_CAP_OSK to IBusCapabilite
- Update ibus restart for --service-file option
- Update manpage for ibus im-module command
- Implement new process_key_event for GTK4
- Add focus_in_id()/focus_out_id() class methods in IBusEngine
This commit is contained in:
Takao Fujiwara 2022-07-07 08:47:31 +09:00
parent f85987315d
commit ebbfbeae29
3 changed files with 1948 additions and 219 deletions

View File

@ -1,6 +1,6 @@
From fd69784c0ed45fe11b801f3a563231735920896a Mon Sep 17 00:00:00 2001 From c093fec83da277c79f31e09b1b910d35bd4135c8 Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com> From: fujiwarat <takao.fujiwara1@gmail.com>
Date: Mon, 23 May 2022 21:50:16 +0900 Date: Sat, 25 Jun 2022 19:46:01 +0900
Subject: [PATCH] Fix SEGV in bus_panel_proxy_focus_in() Subject: [PATCH] Fix SEGV in bus_panel_proxy_focus_in()
rhbz#1350291 SEGV in BUS_IS_CONNECTION(skip_connection) in rhbz#1350291 SEGV in BUS_IS_CONNECTION(skip_connection) in
@ -42,12 +42,12 @@ BUG=rhbz#1767976
BUG=rhbz#1797120 BUG=rhbz#1797120
--- ---
bus/dbusimpl.c | 47 ++++++++++++++++++++++++--- bus/dbusimpl.c | 47 ++++++++++++++++++++++++---
bus/engineproxy.c | 51 ++++++++++++++++++++++------- bus/engineproxy.c | 44 +++++++++++++++++++------
client/x11/main.c | 8 ++++- client/x11/main.c | 8 ++++-
src/ibusbus.c | 6 ++++ src/ibusbus.c | 6 ++++
ui/gtk3/extension.vala | 4 +++ ui/gtk3/extension.vala | 4 +++
ui/gtk3/switcher.vala | 73 +++++++++++++++++++++++++----------------- ui/gtk3/switcher.vala | 73 +++++++++++++++++++++++++-----------------
6 files changed, 142 insertions(+), 47 deletions(-) 6 files changed, 137 insertions(+), 45 deletions(-)
diff --git a/bus/dbusimpl.c b/bus/dbusimpl.c diff --git a/bus/dbusimpl.c b/bus/dbusimpl.c
index 59787a80..af2fbde2 100644 index 59787a80..af2fbde2 100644
@ -138,10 +138,10 @@ index 59787a80..af2fbde2 100644
if (incoming) { if (incoming) {
/* is incoming message */ /* is incoming message */
diff --git a/bus/engineproxy.c b/bus/engineproxy.c diff --git a/bus/engineproxy.c b/bus/engineproxy.c
index 2d98995c..bbbe5532 100644 index fd1f34fb..57c061ba 100644
--- a/bus/engineproxy.c --- a/bus/engineproxy.c
+++ b/bus/engineproxy.c +++ b/bus/engineproxy.c
@@ -660,20 +660,33 @@ bus_engine_proxy_g_signal (GDBusProxy *proxy, @@ -690,10 +690,12 @@ bus_engine_proxy_g_signal (GDBusProxy *proxy,
g_return_if_reached (); g_return_if_reached ();
} }
@ -153,16 +153,14 @@ index 2d98995c..bbbe5532 100644
+ GDBusConnection *connection, + GDBusConnection *connection,
+ GError **error) + GError **error)
{ {
+ GDBusProxyFlags flags; GDBusProxyFlags flags;
+ BusEngineProxy *engine; BusEngineProxy *engine;
+ @@ -704,12 +706,20 @@ bus_engine_proxy_new_internal (const gchar *path,
g_assert (path); g_assert (path);
g_assert (IBUS_IS_ENGINE_DESC (desc)); g_assert (IBUS_IS_ENGINE_DESC (desc));
g_assert (G_IS_DBUS_CONNECTION (connection)); g_assert (G_IS_DBUS_CONNECTION (connection));
+ g_assert (error && *error == NULL); + g_assert (error && *error == NULL);
- GDBusProxyFlags flags = G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START;
- BusEngineProxy *engine =
+ /* rhbz#1601577 engine == NULL if connection is closed. */ + /* rhbz#1601577 engine == NULL if connection is closed. */
+ if (g_dbus_connection_is_closed (connection)) { + if (g_dbus_connection_is_closed (connection)) {
+ *error = g_error_new (G_DBUS_ERROR, + *error = g_error_new (G_DBUS_ERROR,
@ -170,19 +168,19 @@ index 2d98995c..bbbe5532 100644
+ "Connection is closed."); + "Connection is closed.");
+ return NULL; + return NULL;
+ } + }
+ flags = G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START; flags = G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START;
+ engine = engine = (BusEngineProxy *) g_initable_new (
(BusEngineProxy *) g_initable_new (BUS_TYPE_ENGINE_PROXY, BUS_TYPE_ENGINE_PROXY,
NULL, NULL,
- NULL, - NULL,
+ error, + error,
"desc", desc, "desc", desc,
"g-connection", connection, "g-connection", connection,
"g-interface-name", IBUS_INTERFACE_ENGINE, "g-interface-name", IBUS_INTERFACE_ENGINE,
@@ -681,12 +694,19 @@ bus_engine_proxy_new_internal (const gchar *path, @@ -717,6 +727,12 @@ bus_engine_proxy_new_internal (const gchar *path,
"g-default-timeout", g_gdbus_timeout, "g-default-timeout", g_gdbus_timeout,
"g-flags", flags, "g-flags", flags,
NULL); NULL);
+ /* FIXME: rhbz#1601577 */ + /* FIXME: rhbz#1601577 */
+ if (!engine) { + if (!engine) {
+ /* show abrt local variable */ + /* show abrt local variable */
@ -192,6 +190,7 @@ index 2d98995c..bbbe5532 100644
const gchar *layout = ibus_engine_desc_get_layout (desc); const gchar *layout = ibus_engine_desc_get_layout (desc);
if (layout != NULL && layout[0] != '\0') { if (layout != NULL && layout[0] != '\0') {
engine->keymap = ibus_keymap_get (layout); engine->keymap = ibus_keymap_get (layout);
@@ -736,6 +752,7 @@ bus_engine_proxy_new_internal (const gchar *path,
} }
return engine; return engine;
} }
@ -199,7 +198,7 @@ index 2d98995c..bbbe5532 100644
typedef struct { typedef struct {
GTask *task; GTask *task;
@@ -748,23 +768,30 @@ create_engine_ready_cb (BusFactoryProxy *factory, @@ -798,23 +815,30 @@ create_engine_ready_cb (BusFactoryProxy *factory,
GAsyncResult *res, GAsyncResult *res,
EngineProxyNewData *data) EngineProxyNewData *data)
{ {
@ -401,5 +400,5 @@ index a4529c88..29a70dd5 100644
#if VALA_0_34 #if VALA_0_34
seat.ungrab(); seat.ungrab();
-- --
2.35.1 2.35.3

File diff suppressed because it is too large Load Diff

View File

@ -39,7 +39,7 @@
Name: ibus Name: ibus
Version: 1.5.26 Version: 1.5.26
Release: 12%{?dist} Release: 13%{?dist}
Summary: Intelligent Input Bus for Linux OS Summary: Intelligent Input Bus for Linux OS
License: LGPLv2+ License: LGPLv2+
URL: https://github.com/ibus/%name/wiki URL: https://github.com/ibus/%name/wiki
@ -524,6 +524,13 @@ dconf update || :
%{_datadir}/installed-tests/ibus %{_datadir}/installed-tests/ibus
%changelog %changelog
* Thu Jul 07 2022 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.26-13
- Add IBUS_CAP_OSK to IBusCapabilite
- Update ibus restart for --service-file option
- Update manpage for ibus im-module command
- Implement new process_key_event for GTK4
- Add focus_in_id()/focus_out_id() class methods in IBusEngine
* Wed Jun 29 2022 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.26-12 * Wed Jun 29 2022 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.26-12
- Add ibus im-module command - Add ibus im-module command