Update to 43.1

This commit is contained in:
Florian Müllner 2022-11-04 14:07:32 +01:00
parent fe0da4e085
commit cedf25d3ea
6 changed files with 7 additions and 287 deletions

1
.gitignore vendored
View File

@ -208,3 +208,4 @@ gnome-shell-2.31.5.tar.bz2
/gnome-shell-43.beta.tar.xz /gnome-shell-43.beta.tar.xz
/gnome-shell-43.rc.tar.xz /gnome-shell-43.rc.tar.xz
/gnome-shell-43.0.tar.xz /gnome-shell-43.0.tar.xz
/gnome-shell-43.1.tar.xz

View File

@ -1,37 +0,0 @@
From 13c9fd2a668e137b9e2569dcdedb0a25b95ae9aa Mon Sep 17 00:00:00 2001
From: Carlos Garnacho <carlosg@gnome.org>
Date: Wed, 14 Sep 2022 20:20:14 +0200
Subject: [PATCH] status: Use fixed sorting of input sources on empty MRU
When updating the MRU sources if there was no prior MRU, we want
to go with the unmodified list of sources in visibility order.
However iterating over object properties happens in an undetermined
order, so the initial MRU list ends up picking a value at random.
In order to prefer the sources list in the same order than they
appear in the menu if there was no prior MRU, order the keys
when accessing it and building the initial list of sources.
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5873
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2487>
---
js/ui/status/keyboard.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/js/ui/status/keyboard.js b/js/ui/status/keyboard.js
index 76a42f6bd7..65b3962731 100644
--- a/js/ui/status/keyboard.js
+++ b/js/ui/status/keyboard.js
@@ -492,7 +492,7 @@ var InputSourceManager = class extends Signals.EventEmitter {
_updateMruSources() {
let sourcesList = [];
- for (let i in this._inputSources)
+ for (let i of Object.keys(this._inputSources).sort((a, b) => a - b))
sourcesList.push(this._inputSources[i]);
this._keyboardManager.setUserLayouts(sourcesList.map(x => x.xkbId));
--
GitLab

View File

@ -1,68 +0,0 @@
From 79a45d691fb03279f501b33bfbefd933e94ec12d Mon Sep 17 00:00:00 2001
From: Carlos Garnacho <carlosg@gnome.org>
Date: Mon, 19 Sep 2022 22:35:15 +0200
Subject: [PATCH] status: Ignore prior single-element lists updating input
sources MRU
Consider the existing input sources MRU only valid if it contained
more than one element to pick from. Fixes the following situation
with initial-setup sessions:
- Initial setup Session starts, with several input sources already
configured ("us" between them)
- InputSourceManager initializes, only the default "us" keymap is
available
- MRU list is constructed, "us" is picked
- InputSourceManager catches up with session configuration, the
other extra sources are added
- MRU list is reconstructed, "us" is already the most recent
- Session ends up with "us" picked, regardless of its position in
the list, and no MRU existing prior to startup
If we consider the intermediate single-element MRU list invalid,
it is still possible to pick the best default source between all
the configured ones (the one that was put first in the list,
basically), after initialization is complete.
But also, it is unnecessary to have if there is a single source to
pick from. After the sources list has two elements of more, the
MRU list will become effective and preserved during changes to
the available sources.
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5873
---
js/ui/status/keyboard.js | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/js/ui/status/keyboard.js b/js/ui/status/keyboard.js
index 65b3962731..82706c0389 100644
--- a/js/ui/status/keyboard.js
+++ b/js/ui/status/keyboard.js
@@ -524,15 +524,18 @@ var InputSourceManager = class extends Signals.EventEmitter {
}
let mruSources = [];
- for (let i = 0; i < this._mruSources.length; i++) {
- for (let j = 0; j < sourcesList.length; j++) {
- if (this._mruSources[i].type == sourcesList[j].type &&
- this._mruSources[i].id == sourcesList[j].id) {
- mruSources = mruSources.concat(sourcesList.splice(j, 1));
- break;
+ if (this._mruSources.length > 1) {
+ for (let i = 0; i < this._mruSources.length; i++) {
+ for (let j = 0; j < sourcesList.length; j++) {
+ if (this._mruSources[i].type === sourcesList[j].type &&
+ this._mruSources[i].id === sourcesList[j].id) {
+ mruSources = mruSources.concat(sourcesList.splice(j, 1));
+ break;
+ }
}
}
}
+
this._mruSources = mruSources.concat(sourcesList);
}
--
GitLab

View File

@ -1,168 +0,0 @@
From 524a5401266f8b30c2210cf147530cbb815b71ed Mon Sep 17 00:00:00 2001
From: Carlos Garnacho <carlosg@gnome.org>
Date: Tue, 11 Oct 2022 18:23:19 +0200
Subject: [PATCH 1/2] keyboard: Refactor code
Move inline anonymous function to be its own. This method
will become asynchronous in following commits.
---
js/ui/keyboard.js | 54 +++++++++++++++++++++++++----------------------
1 file changed, 29 insertions(+), 25 deletions(-)
diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js
index 895691c34e..28369316e1 100644
--- a/js/ui/keyboard.js
+++ b/js/ui/keyboard.js
@@ -1510,31 +1510,8 @@ var Keyboard = GObject.registerClass({
button.setWidth(key.width);
if (key.action !== 'modifier') {
- button.connect('commit', (actor, keyval, str) => {
- if (this._modifiers.size === 0 && str !== '' &&
- keyval && this._oskCompletionEnabled) {
- Main.inputMethod.handleVirtualKey(keyval);
- return;
- }
-
- if (str === '' || !Main.inputMethod.currentFocus ||
- (keyval && this._oskCompletionEnabled) ||
- this._modifiers.size > 0 ||
- !this._keyboardController.commitString(str, true)) {
- if (keyval !== 0) {
- this._forwardModifiers(this._modifiers, Clutter.EventType.KEY_PRESS);
- this._keyboardController.keyvalPress(keyval);
- GLib.timeout_add(GLib.PRIORITY_DEFAULT, KEY_RELEASE_TIMEOUT, () => {
- this._keyboardController.keyvalRelease(keyval);
- this._forwardModifiers(this._modifiers, Clutter.EventType.KEY_RELEASE);
- this._disableAllModifiers();
- return GLib.SOURCE_REMOVE;
- });
- }
- }
-
- if (!this._latched)
- this._setActiveLayer(0);
+ button.connect('commit', (_actor, keyval, str) => {
+ this._commitAction(keyval, str);
});
}
@@ -1592,6 +1569,33 @@ var Keyboard = GObject.registerClass({
}
}
+ _commitAction(keyval, str) {
+ if (this._modifiers.size === 0 && str !== '' &&
+ keyval && this._oskCompletionEnabled) {
+ Main.inputMethod.handleVirtualKey(keyval);
+ return;
+ }
+
+ if (str === '' || !Main.inputMethod.currentFocus ||
+ (keyval && this._oskCompletionEnabled) ||
+ this._modifiers.size > 0 ||
+ !this._keyboardController.commitString(str, true)) {
+ if (keyval !== 0) {
+ this._forwardModifiers(this._modifiers, Clutter.EventType.KEY_PRESS);
+ this._keyboardController.keyvalPress(keyval);
+ GLib.timeout_add(GLib.PRIORITY_DEFAULT, KEY_RELEASE_TIMEOUT, () => {
+ this._keyboardController.keyvalRelease(keyval);
+ this._forwardModifiers(this._modifiers, Clutter.EventType.KEY_RELEASE);
+ this._disableAllModifiers();
+ return GLib.SOURCE_REMOVE;
+ });
+ }
+ }
+
+ if (!this._latched)
+ this._setActiveLayer(0);
+ }
+
_previousWordPosition(text, cursor) {
/* Skip word prior to cursor */
let pos = Math.max(0, text.slice(0, cursor).search(/\s+\S+\s*$/));
--
GitLab
From 6e997c993e8c392b88cb97644ad604be6dd8028a Mon Sep 17 00:00:00 2001
From: Carlos Garnacho <carlosg@gnome.org>
Date: Tue, 11 Oct 2022 18:24:15 +0200
Subject: [PATCH 2/2] inputMethod: Check return value when letting IM handle
virtual keys
When propagating keys from the OSK, we usually feed these directly to
the IBusInputContext and let the IM handle the effects of this virtual
key event (which may also include feeding a key event back to us).
But these functions may also return a FALSE value if the key was "let
through" by the IM, which means the ball is in our yard again, and
we are responsible of letting this event get to its destination.
If that happens, just fall through, so the string is committed to
the client as an UTF-8 string, or propagated through keyboard events.
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5930
---
js/misc/inputMethod.js | 19 ++++++++++++++-----
js/ui/keyboard.js | 6 +++---
2 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/js/misc/inputMethod.js b/js/misc/inputMethod.js
index 7bf6646d80..906fe1fc93 100644
--- a/js/misc/inputMethod.js
+++ b/js/misc/inputMethod.js
@@ -7,6 +7,8 @@ const Main = imports.ui.main;
Gio._promisify(IBus.Bus.prototype,
'create_input_context_async', 'create_input_context_async_finish');
+Gio._promisify(IBus.InputContext.prototype,
+ 'process_key_event_async', 'process_key_event_async_finish');
var HIDE_PANEL_TIME = 50;
@@ -329,10 +331,17 @@ var InputMethod = GObject.registerClass({
return this._preeditVisible && this._preeditStr !== '' && this._preeditStr !== null;
}
- handleVirtualKey(keyval) {
- this._context.process_key_event_async(
- keyval, 0, 0, -1, null, null);
- this._context.process_key_event_async(
- keyval, 0, IBus.ModifierType.RELEASE_MASK, -1, null, null);
+ async handleVirtualKey(keyval) {
+ try {
+ if (!await this._context.process_key_event_async(
+ keyval, 0, 0, -1, null))
+ return false;
+
+ await this._context.process_key_event_async(
+ keyval, 0, IBus.ModifierType.RELEASE_MASK, -1, null);
+ return true;
+ } catch (e) {
+ return false;
+ }
}
});
diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js
index 28369316e1..3241571de7 100644
--- a/js/ui/keyboard.js
+++ b/js/ui/keyboard.js
@@ -1569,11 +1569,11 @@ var Keyboard = GObject.registerClass({
}
}
- _commitAction(keyval, str) {
+ async _commitAction(keyval, str) {
if (this._modifiers.size === 0 && str !== '' &&
keyval && this._oskCompletionEnabled) {
- Main.inputMethod.handleVirtualKey(keyval);
- return;
+ if (await Main.inputMethod.handleVirtualKey(keyval))
+ return;
}
if (str === '' || !Main.inputMethod.currentFocus ||
--
GitLab

View File

@ -1,25 +1,14 @@
%global tarball_version %%(echo %{version} | tr '~' '.') %global tarball_version %%(echo %{version} | tr '~' '.')
Name: gnome-shell Name: gnome-shell
Version: 43.0 Version: 43.1
Release: 3%{?dist} Release: 1%{?dist}
Summary: Window management and application launching for GNOME Summary: Window management and application launching for GNOME
License: GPLv2+ License: GPLv2+
URL: https://wiki.gnome.org/Projects/GnomeShell URL: https://wiki.gnome.org/Projects/GnomeShell
Source0: https://download.gnome.org/sources/gnome-shell/43/%{name}-%{tarball_version}.tar.xz Source0: https://download.gnome.org/sources/gnome-shell/43/%{name}-%{tarball_version}.tar.xz
# Backported from upstream
# https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2487
Patch0: 2487.patch
# Backported from upstream
# https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2495
Patch1: 2495.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=2131837
# Backported from upstream
# https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2508
Patch2: 2508.patch
# Replace Epiphany with Firefox in the default favourite apps list # Replace Epiphany with Firefox in the default favourite apps list
Patch10001: gnome-shell-favourite-apps-firefox.patch Patch10001: gnome-shell-favourite-apps-firefox.patch
@ -242,6 +231,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/evolution-calendar.de
%{_mandir}/man1/gnome-shell.1* %{_mandir}/man1/gnome-shell.1*
%changelog %changelog
* Fri Nov 04 2022 Florian Müllner <fmuellner@redhat.com> - 43.1-1
- Update to 43.1
* Tue Oct 11 2022 Adam Williamson <awilliam@redhat.com> - 43.0-3 * Tue Oct 11 2022 Adam Williamson <awilliam@redhat.com> - 43.0-3
- Backport MR2508 to fix OSK space entry (#2131837) - Backport MR2508 to fix OSK space entry (#2131837)

View File

@ -1 +1 @@
SHA512 (gnome-shell-43.0.tar.xz) = 6f3609c8bac923f052d51fce44a448dba997cac543331b56229f46b56e8770de9370deb7759d4bf0e7385794232715b9b34e41f90dd1da30e88d5cfbf3f095eb SHA512 (gnome-shell-43.1.tar.xz) = 1e41f0ce38b285aca1f9189fdb50e4d409232554da73e9c08e21b5888d35bad3e2bf4a47e93fdf20798ea6f63864223088b78cab7c63fc1105cd955701ea2e81