Backport fix for password entry modifier key issues (#1569211)

This commit is contained in:
Adam Williamson 2018-04-29 15:19:42 -07:00
parent a6345a11fb
commit 11366f8161
2 changed files with 61 additions and 1 deletions

View File

@ -0,0 +1,52 @@
From 642107a28f9616b5836d6da3b57d9bfc33acc8d0 Mon Sep 17 00:00:00 2001
From: Carlos Garnacho <carlosg@gnome.org>
Date: Sun, 29 Apr 2018 16:28:04 +0200
Subject: [PATCH] keyboardManager: Preserve current keymap across reloads
The IM can pretty much update the input sources anytime (even if
to set the same ones). That ends up triggering rebuilding all user
defined keymaps, and losing modifier state if we are unfortunate
enough that this caught us while pressing one.
One common situation seems to be password entries, resulting in
the wrong character being printed if the first character happens
to require the shift key.
If the current keymap is not found in the newly loaded list,
this._current will end up null, with the same behavior as we get
currently (immediate keymap reload).
https://bugzilla.redhat.com/show_bug.cgi?id=1569211
https://gitlab.gnome.org/GNOME/gnome-shell/issues/240
Closes: #240
---
js/misc/keyboardManager.js | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/js/misc/keyboardManager.js b/js/misc/keyboardManager.js
index b8984fe98..3f0bad282 100644
--- a/js/misc/keyboardManager.js
+++ b/js/misc/keyboardManager.js
@@ -89,6 +89,7 @@ var KeyboardManager = new Lang.Class({
},
setUserLayouts(ids) {
+ let currentId = this._current ? this._current.id : null;
this._current = null;
this._layoutInfos = {};
@@ -115,6 +116,9 @@ var KeyboardManager = new Lang.Class({
info.group = group;
info.groupIndex = groupIndex;
+ if (id == currentId)
+ this._current = info;
+
i += 1;
}
},
--
2.17.0

View File

@ -1,6 +1,6 @@
Name: gnome-shell Name: gnome-shell
Version: 3.29.1 Version: 3.29.1
Release: 1%{?dist} Release: 2%{?dist}
Summary: Window management and application launching for GNOME Summary: Window management and application launching for GNOME
Group: User Interface/Desktops Group: User Interface/Desktops
@ -13,6 +13,10 @@ Source0: http://download.gnome.org/sources/gnome-shell/3.29/%{name}-%{ver
# Replace Epiphany with Firefox in the default favourite apps list # Replace Epiphany with Firefox in the default favourite apps list
Patch1: gnome-shell-favourite-apps-firefox.patch Patch1: gnome-shell-favourite-apps-firefox.patch
# Fix problems when first character in password entry uses a modifier
# key - GGO#240, RHBZ #1569211, backported from upstream master
Patch2: 0001-keyboardManager-Preserve-current-keymap-across-reloa.patch
%define gnome_bluetooth_version 1:3.9.0 %define gnome_bluetooth_version 1:3.9.0
%define gobject_introspection_version 1.45.4 %define gobject_introspection_version 1.45.4
%define gjs_version 1.51.90 %define gjs_version 1.51.90
@ -119,6 +123,7 @@ easy to use experience.
%prep %prep
%setup -q %setup -q
%patch1 -p1 -b .firefox %patch1 -p1 -b .firefox
%patch2 -p1 -b .preserve-keymap
%build %build
%meson %meson
@ -184,6 +189,9 @@ glib-compile-schemas --allow-any-name %{_datadir}/glib-2.0/schemas &> /dev/null
%{_mandir}/man1/%{name}.1.gz %{_mandir}/man1/%{name}.1.gz
%changelog %changelog
* Sun Apr 29 2018 Adam Williamson <awilliam@redhat.com> - 3.29.1-2
- Backport fix for password entry modifier key issues (#1569211)
* Wed Apr 25 2018 Florian Müllner <fmuellner@redhat.com> - 3.29.1-1 * Wed Apr 25 2018 Florian Müllner <fmuellner@redhat.com> - 3.29.1-1
- Update to 3.29.1 - Update to 3.29.1