From 657bcd838641915996680dd5ff939bbbea6485d1 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Mon, 4 May 2020 16:51:02 -0700 Subject: [PATCH] Backport MR #1235 to fix input methods on panel --- ...-the-panel-after-porting-to-Promises.patch | 49 +++++++++++++++++++ gnome-shell.spec | 10 +++- 2 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 0001-ibusManager-Fix-the-panel-after-porting-to-Promises.patch diff --git a/0001-ibusManager-Fix-the-panel-after-porting-to-Promises.patch b/0001-ibusManager-Fix-the-panel-after-porting-to-Promises.patch new file mode 100644 index 0000000..898d90b --- /dev/null +++ b/0001-ibusManager-Fix-the-panel-after-porting-to-Promises.patch @@ -0,0 +1,49 @@ +From e08a4acd06d59cb94585e291356ec591d4779910 Mon Sep 17 00:00:00 2001 +From: Ting-Wei Lan +Date: Sun, 3 May 2020 23:26:39 +0800 +Subject: [PATCH] ibusManager: Fix the panel after porting to Promises + +Commit 764527c8c9b7659901eb6296a6859ae2b0eabdb8 not only ports this file +to Promises but also changes the behavior of _initPanelService method. +Instead of always calling _updateReadiness when _panelService is ready, +it only calls it when get_global_engine_async succeeds. + +The only callers of _updateReadiness are _initEngines and +_initPanelService. Assume that _initEngines completes first. Its +_updateReadiness call keeps _ready as false and it is expected for +_initPanelService to change it to true. However, since +get_global_engine_async fails because there is no active engine, +_initPanelService never calls _updateReadiness. Therefore, all setEngine +calls do nothing because _ready is false, and the input method panel +never shows. Users are unable to use any input method even if they can +see that ibus-daemon is already running. + +Fix the issue by changing it back to the old behavior. + +https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1235 +--- + js/misc/ibusManager.js | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/js/misc/ibusManager.js b/js/misc/ibusManager.js +index e8cfead2c..d9a9a9d60 100644 +--- a/js/misc/ibusManager.js ++++ b/js/misc/ibusManager.js +@@ -171,13 +171,13 @@ var IBusManager = class { + this._panelService.connect('set-content-type', this._setContentType.bind(this)); + } catch (e) { + } ++ this._updateReadiness(); + + try { + // If an engine is already active we need to get its properties + const engine = + await this._ibus.get_global_engine_async(-1, this._cancellable); + this._engineChanged(this._ibus, engine.get_name()); +- this._updateReadiness(); + } catch (e) { + } + } +-- +2.26.2 + diff --git a/gnome-shell.spec b/gnome-shell.spec index 2ad4c81..cef6c12 100644 --- a/gnome-shell.spec +++ b/gnome-shell.spec @@ -1,6 +1,6 @@ Name: gnome-shell Version: 3.37.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Window management and application launching for GNOME License: GPLv2+ @@ -17,6 +17,11 @@ Patch1: gnome-shell-favourite-apps-firefox.patch Patch2: 0001-endSessionDialog-Immediately-add-buttons-to-the-dial.patch Patch3: 0002-endSessionDialog-Support-rebooting-into-the-bootload.patch +# Fix panel to show input methods again +# https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1235 +# https://gitlab.gnome.org/GNOME/gnome-shell/-/commit/e08a4acd +Patch4: 0001-ibusManager-Fix-the-panel-after-porting-to-Promises.patch + %define eds_version 3.33.1 %define gnome_desktop_version 3.35.91 %define glib2_version 2.56.0 @@ -213,6 +218,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/evolution-calendar.de %{_mandir}/man1/gnome-shell.1* %changelog +* Mon May 04 2020 Adam Williamson - 3.37.1-2 +- Fix panel to show input methods (MR #1235) + * Thu Apr 30 2020 Florian Müllner