Fix Super modifier in IBusEngine

Replace deprecated pygobject3-devel with python3-gobject-devel
This commit is contained in:
Takao Fujiwara 2024-03-25 16:39:00 +09:00
parent 0be81a7069
commit ab68d7b87e
2 changed files with 97 additions and 3 deletions

89
ibus-HEAD.patch Normal file
View File

@ -0,0 +1,89 @@
From 7f3bde01636213605e3b9c62d91b8f9b5635b9a6 Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
Date: Sat, 23 Mar 2024 13:09:26 +0900
Subject: [PATCH] src/ibusengine: Identify SUPER_MASK in GTK4 with MOD4_MASK
Fix the regression not to save the changed modifiers.
Fixes: https://github.com/ibus/ibus/commit/e4eaeb7
BUG=https://github.com/ibus/ibus/issues/2607
---
src/ibusengine.c | 22 ++++++++++++++++------
1 file changed, 16 insertions(+), 6 deletions(-)
diff --git a/src/ibusengine.c b/src/ibusengine.c
index 9cdf6479..eff4992c 100644
--- a/src/ibusengine.c
+++ b/src/ibusengine.c
@@ -317,7 +317,11 @@ static const guint IBUS_MODIFIER_FILTER =
IBUS_BUTTON2_MASK |
IBUS_BUTTON3_MASK |
IBUS_BUTTON4_MASK |
- IBUS_BUTTON5_MASK);
+ IBUS_BUTTON5_MASK |
+ IBUS_SUPER_MASK |
+ IBUS_HYPER_MASK |
+ IBUS_META_MASK);
+
static void
ibus_engine_class_init (IBusEngineClass *class)
@@ -1112,7 +1116,17 @@ ibus_engine_filter_key_event (IBusEngine *engine,
g_return_val_if_fail (IBUS_IS_ENGINE (engine), FALSE);
priv = engine->priv;
- modifiers = state & IBUS_MODIFIER_FILTER;
+ modifiers = state;
+ /*
+ * GTK3 has both IBUS_SUPER_MASK & IBUS_MOD4_MASK.
+ * GTK4 has IBUS_SUPER_MASK.
+ * Qt5 has IBUS_MOD4_MASK.
+ */
+ if (modifiers & IBUS_SUPER_MASK) {
+ modifiers &= ~IBUS_SUPER_MASK;
+ modifiers |= IBUS_MOD4_MASK;
+ }
+ modifiers = modifiers & IBUS_MODIFIER_FILTER;
if (keyval >= IBUS_KEY_A && keyval <= IBUS_KEY_Z &&
(modifiers & IBUS_SHIFT_MASK) != 0) {
keyval = keyval - IBUS_KEY_A + IBUS_KEY_a;
@@ -1130,10 +1144,6 @@ ibus_engine_filter_key_event (IBusEngine *engine,
for (; keys; keys++) {
if (keys->keyval == 0 && keys->keycode == 0 && keys->state == 0)
break;
- if ((keys->state != modifiers) && (keys->state & IBUS_MOD4_MASK)) {
- keys->state &= ~IBUS_MOD4_MASK;
- keys->state |= IBUS_SUPER_MASK;
- }
if (keys->keyval == keyval &&
keys->state == modifiers &&
(keys->keycode == 0 || keys->keycode == keycode)) {
--
2.43.0
From 707832954e1aaaae9a695d9771e84a21844be605 Mon Sep 17 00:00:00 2001
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
Date: Mon, 25 Mar 2024 14:40:12 +0900
Subject: [PATCH] configure: Fix bash '=' operator for BSD
BUG=https://github.com/ibus/ibus/pull/2626
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 0bb8e4a1..15cb02cd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -356,7 +356,7 @@ if test x"$cross_compiling" != xyes; then
X11_LOCALEDATADIR="$X11_PREFIX/lib/X11/locale",
X11_LOCALEDATADIR="$(datadir)/X11/locale")])
else
- if test x"$X11_LOCALEDATADIR" == x; then
+ if test x"$X11_LOCALEDATADIR" = x; then
X11_LOCALEDATADIR="$X11_PREFIX/share/X11/locale"
fi
AC_MSG_RESULT([Skipping X11 locale directory check when cross compiling. Using: $X11_LOCALEDATADIR])
--
2.43.0

View File

@ -58,7 +58,8 @@
Name: ibus
Version: 1.5.30~rc2
Release: 1%{?dist}
# https://github.com/fedora-infra/rpmautospec/issues/101
Release: 2%{?dist}
Summary: Intelligent Input Bus for Linux OS
License: LGPL-2.1-or-later
URL: https://github.com/ibus/%name/wiki
@ -210,7 +211,7 @@ Requires: %{name} = %{version}-%{release}
%{?__python3:Requires: %{__python3}}
Requires: python3-gobject
BuildRequires: gobject-introspection-devel
BuildRequires: pygobject3-devel
BuildRequires: python3-gobject-devel
BuildRequires: make
BuildArch: noarch
@ -583,7 +584,11 @@ dconf update || :
%{_datadir}/installed-tests/ibus
%changelog
* Fri Mar 22 2024 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.30~rc1-2
* Mon Mar 25 2024 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.30~rc2-2
- Fix Super modifier in IBusEngine
- Replace deprecated pygobject3-devel with python3-gobject-devel
* Fri Mar 22 2024 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.30~rc2-1
- Add some bug fixes & translation updates
* Wed Feb 28 2024 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.30~rc1-1