[gnome-shell/wip/lantw/ibusManager-Fix-the-panel-after-porting-to-Promises] ibusManager: Fix the panel after porting to Promises
- From: Ting-Wei Lan <lantw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/lantw/ibusManager-Fix-the-panel-after-porting-to-Promises] ibusManager: Fix the panel after porting to Promises
- Date: Sun, 3 May 2020 15:24:37 +0000 (UTC)
commit 2b4fa28add6b1cc5195ceea779ac1602c4c3d372
Author: Ting-Wei Lan <lantw src gnome org>
Date: Sun May 3 23:23:13 2020 +0800
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.
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 e8cfead2ce..d9a9a9d602 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) {
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]