Accepting request 1145410 from M17N
- Fix dead keys with non-English keyboard in some applications (MAME, Wine) (boo#1218135) ibus-complete-preedit-signals-for-postprocesskeyevent.patch ibus-enginesimple-dont-commit-any-characters.patch OBS-URL: https://build.opensuse.org/request/show/1145410 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ibus?expand=0&rev=125
This commit is contained in:
commit
65ff6fdc29
71
ibus-complete-preedit-signals-for-postprocesskeyevent.patch
Normal file
71
ibus-complete-preedit-signals-for-postprocesskeyevent.patch
Normal file
@ -0,0 +1,71 @@
|
||||
From: fujiwarat <takao.fujiwara1@gmail.com>
|
||||
Date: Tue, 5 Dec 2023 23:13:25 +0900
|
||||
Subject: src: Complete preedit signals for PostProcessKeyEvent
|
||||
Git-commit: 719792d300579c1bfdf43251a83c6ed4e5594c07
|
||||
Patch-mainline: yes
|
||||
References: boo#1218135
|
||||
|
||||
I forgot to implement show-preedit-text and hide-preedit-text signals
|
||||
with PostProcessKeyEvent D-Bus signal in the client side.
|
||||
|
||||
Fixes: https://github.com/ibus/ibus/commit/e059536
|
||||
|
||||
BUG=https://github.com/ibus/ibus/issues/2585
|
||||
---
|
||||
src/ibusinputcontext.c | 33 ++++++++++++++++++++++++++-------
|
||||
1 file changed, 26 insertions(+), 7 deletions(-)
|
||||
|
||||
--- ibus-1.5.29-rc2.orig/src/ibusinputcontext.c
|
||||
+++ ibus-1.5.29-rc2/src/ibusinputcontext.c
|
||||
@@ -1464,6 +1464,22 @@ ibus_input_context_fwd_text_to_delete_su
|
||||
|
||||
|
||||
static void
|
||||
+ibus_input_context_fwd_text_to_hide_preedit (IBusInputContext *context,
|
||||
+ IBusText *text)
|
||||
+{
|
||||
+ g_signal_emit (context, context_signals[HIDE_PREEDIT_TEXT], 0, text);
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static void
|
||||
+ibus_input_context_fwd_text_to_show_preedit (IBusInputContext *context,
|
||||
+ IBusText *text)
|
||||
+{
|
||||
+ g_signal_emit (context, context_signals[SHOW_PREEDIT_TEXT], 0, text);
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static void
|
||||
ibus_input_context_fwd_text_to_update_preedit (IBusInputContext *context,
|
||||
IBusText *text,
|
||||
IBusText *position,
|
||||
@@ -1558,18 +1574,21 @@ ibus_input_context_post_process_key_even
|
||||
case 'c':
|
||||
ibus_input_context_fwd_text_to_commit (context, text);
|
||||
break;
|
||||
- case 'f': {
|
||||
+ case 'd':
|
||||
+ ibus_input_context_fwd_text_to_delete_surrounding (context, text);
|
||||
+ break;
|
||||
+ case 'f':
|
||||
ibus_input_context_fwd_text_to_forward_key_event (context, text);
|
||||
break;
|
||||
- }
|
||||
- case 'r': {
|
||||
+ case 'h':
|
||||
+ ibus_input_context_fwd_text_to_hide_preedit (context, text);
|
||||
+ break;
|
||||
+ case 'r':
|
||||
ibus_input_context_fwd_text_to_require_surrounding (context, text);
|
||||
break;
|
||||
- }
|
||||
- case 'd': {
|
||||
- ibus_input_context_fwd_text_to_delete_surrounding (context, text);
|
||||
+ case 's':
|
||||
+ ibus_input_context_fwd_text_to_show_preedit (context, text);
|
||||
break;
|
||||
- }
|
||||
case 'u':
|
||||
case 'm': {
|
||||
IBusText *position;
|
66
ibus-enginesimple-dont-commit-any-characters.patch
Normal file
66
ibus-enginesimple-dont-commit-any-characters.patch
Normal file
@ -0,0 +1,66 @@
|
||||
From: fujiwarat <takao.fujiwara1@gmail.com>
|
||||
Date: Thu, 21 Dec 2023 08:26:48 +0900
|
||||
Subject: src/ibusenginesimple.c: Don't commit any characters
|
||||
Git-commit: 4872c1fcdc8bbe146e967d004edf63f5994b21f8
|
||||
Patch-mainline: yes
|
||||
References: boo#1218135
|
||||
|
||||
Revert a part of the previous patch of #2495 because it explains
|
||||
"Super-space and space key can launch IBus Emojier." but I cannot
|
||||
remember what I tried to fix.
|
||||
|
||||
IBus XKB engines should not commit any keysyms before the key event is
|
||||
sent to the application with IBUS_IGNORED_MASK flag even if the key
|
||||
is not an ASCII because any characters can be control characters
|
||||
by application.
|
||||
E.g. VIM cursor mode "hjkl" keys or game cursor keys with language
|
||||
layouts.
|
||||
|
||||
Fixes: https://github.com/ibus/ibus/commit/ad883dc
|
||||
|
||||
BUG=https://github.com/ibus/ibus/issues/2588
|
||||
---
|
||||
client/gtk2/ibusimcontext.c | 6 ++++++
|
||||
src/ibusenginesimple.c | 15 ++++++++++-----
|
||||
2 files changed, 16 insertions(+), 5 deletions(-)
|
||||
|
||||
--- ibus-1.5.29-rc2.orig/client/gtk2/ibusimcontext.c
|
||||
+++ ibus-1.5.29-rc2/client/gtk2/ibusimcontext.c
|
||||
@@ -361,6 +361,12 @@ ibus_im_context_commit_event (IBusIMCont
|
||||
keyval == GDK_KEY_KP_Enter) {
|
||||
return FALSE;
|
||||
}
|
||||
+ /* #2588 If IBus tries to commit a character, it should be forwarded to
|
||||
+ * the application at once with IBUS_IGNORED_MASK before the actual
|
||||
+ * commit because any characters can be control characters even if
|
||||
+ * they are not ASCII characters, e.g. game cursor keys with a
|
||||
+ * language keyboard layout likes VIM cursor mode "hjkl" keys.
|
||||
+ */
|
||||
ch = ibus_keyval_to_unicode (keyval);
|
||||
if (ch != 0 && !g_unichar_iscntrl (ch)) {
|
||||
IBusText *text = ibus_text_new_from_unichar (ch);
|
||||
--- ibus-1.5.29-rc2.orig/src/ibusenginesimple.c
|
||||
+++ ibus-1.5.29-rc2/src/ibusenginesimple.c
|
||||
@@ -647,12 +647,17 @@ no_sequence_matches (IBusEngineSimple *s
|
||||
|
||||
ibus_engine_simple_update_preedit_text (simple);
|
||||
ch = ibus_keyval_to_unicode (keyval);
|
||||
- /* IBUS_CHANGE: RH#769133
|
||||
- * Since we use ibus xkb engines as the disable state,
|
||||
- * Super-space and space key can launch IBus Emojier.
|
||||
+ /* IBUS_CHANGE: RH#769133, #2588
|
||||
+ * Since we use ibus xkb engines as the disable IM mode,
|
||||
+ * do not commit the characters locally without in_hex_sequence.
|
||||
+ * If IBus tries to commit a character, it should be forwarded to
|
||||
+ * the application at once with IBUS_IGNORED_MASK before the actual
|
||||
+ * commit because any characters can be control characters even if
|
||||
+ * they are not ASCII characters, e.g. game cursor keys with a
|
||||
+ * language keyboard layout likes VIM cursor mode "hjkl" keys.
|
||||
*/
|
||||
- if (ch != 0 && !g_unichar_iscntrl (ch) && ch > 0x7F) {
|
||||
- ibus_engine_simple_commit_char (simple, ch);
|
||||
+ if (ch != 0 && !g_unichar_iscntrl (ch) &&
|
||||
+ priv->in_hex_sequence) {
|
||||
return TRUE;
|
||||
} else {
|
||||
return FALSE;
|
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Feb 4 08:53:08 UTC 2024 - Jean Delvare <jdelvare@suse.com>
|
||||
|
||||
- Fix dead keys with non-English keyboard in some applications
|
||||
(MAME, Wine) (boo#1218135)
|
||||
ibus-complete-preedit-signals-for-postprocesskeyevent.patch
|
||||
ibus-enginesimple-dont-commit-any-characters.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 19 15:23:25 UTC 2024 - Callum Farmer <gmbr3@opensuse.org>
|
||||
|
||||
|
10
ibus.spec
10
ibus.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file
|
||||
#
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -76,6 +76,12 @@ Patch15: ibus-socket-name-compatibility.patch
|
||||
# PATCH-FIX-UPSTREAM ibus-ui-gtk3-restart-via-systemd.patch
|
||||
# Allow ibus-ui-gtk3 to restart ibus-daemon when it is launched by systemd
|
||||
Patch16: ibus-ui-gtk3-restart-via-systemd.patch
|
||||
# PATCH-FIX-UPSTREAM ibus-complete-preedit-signals-for-postprocesskeyevent.patch
|
||||
# Fix dead keys on non-English keyboards for some applications (boo#1218135)
|
||||
Patch17: ibus-complete-preedit-signals-for-postprocesskeyevent.patch
|
||||
# PATCH-FIX-UPSTREAM ibus-enginesimple-dont-commit-any-characters.patch
|
||||
# Fix dead keys on non-English keyboards for Wine (boo#1218135)
|
||||
Patch18: ibus-enginesimple-dont-commit-any-characters.patch
|
||||
BuildRequires: pkgconfig(dbusmenu-glib-0.4)
|
||||
BuildRequires: pkgconfig(dbusmenu-gtk3-0.4)
|
||||
BuildRequires: pkgconfig(iso-codes)
|
||||
@ -236,6 +242,8 @@ cp -r %{SOURCE11} .
|
||||
%patch15 -p1
|
||||
%endif
|
||||
%patch16 -p1
|
||||
%patch17 -p1
|
||||
%patch18 -p1
|
||||
|
||||
%build
|
||||
%configure --disable-static \
|
||||
|
Loading…
Reference in New Issue
Block a user