Fix enter, space, backspace keys not working with input methods

https://bugzilla.redhat.com/show_bug.cgi?id=1942294
This commit is contained in:
Kalev Lember 2021-03-30 11:33:43 +02:00
parent 820353c441
commit 25f8b86fe7
2 changed files with 38 additions and 1 deletions

30
1802.patch Normal file
View File

@ -0,0 +1,30 @@
From e3bd764491b65b21650997966b7396879d642b10 Mon Sep 17 00:00:00 2001
From: Takao Fujiwara <tfujiwar@redhat.com>
Date: Thu, 25 Mar 2021 17:24:19 +0900
Subject: [PATCH] clutter/input-method: Calculate evdev_code from keycode
evdev_cocde is forwarded in meta-wayland-keyboard.c:default_grab_key()
in mutter 40 and clutter_input_method_forward_key() should assign
evdev_code.
Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1709#
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1802>
---
clutter/clutter/clutter-input-method.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/clutter/clutter/clutter-input-method.c b/clutter/clutter/clutter-input-method.c
index b24df2e80e..ff62925a51 100644
--- a/clutter/clutter/clutter-input-method.c
+++ b/clutter/clutter/clutter-input-method.c
@@ -495,6 +495,7 @@ clutter_input_method_forward_key (ClutterInputMethod *im,
event->key.modifier_state = state;
event->key.keyval = keyval;
event->key.hardware_keycode = keycode;
+ event->key.evdev_code = keycode - 8;
event->key.unicode_value = clutter_keysym_to_unicode (keyval);
clutter_event_set_device (event, keyboard);
--
GitLab

View File

@ -10,7 +10,7 @@
Name: mutter
Version: 40.0
Release: 3%{?dist}
Release: 4%{?dist}
Summary: Window and compositing manager based on Clutter
License: GPLv2+
@ -29,6 +29,10 @@ Patch2: 0001-Test-deny-atomic-KMS-for-tegra-RHBZ-1936991.patch
# Fix crash on resume (rhbz#1941971)
Patch3: egl-surface-fixes.patch
# https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1802
# Fix enter, space, backspace keys not working with input methods
Patch4: 1802.patch
BuildRequires: chrpath
BuildRequires: pango-devel
BuildRequires: startup-notification-devel
@ -178,6 +182,9 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop
%{_datadir}/mutter-%{mutter_api_version}/tests
%changelog
* Tue Mar 30 2021 Kalev Lember <klember@redhat.com> - 40.0-4
- Fix enter, space, backspace keys not working with input methods (#1942294)
* Thu Mar 25 2021 Jonas Ådahl <jadahl@redhat.com> - 40.0-3
- Fix crash on resume (rhbz#1941971)