[gnome-shell/wip/carlosg/x11-services-on-demand: 36/37] ibusManager: Add call to restart the ibus daemon
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/carlosg/x11-services-on-demand: 36/37] ibusManager: Add call to restart the ibus daemon
- Date: Wed, 4 Sep 2019 15:34:45 +0000 (UTC)
commit 358927fe3f357a95dbd05d25f6f64ee58c814d26
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Aug 15 13:28:59 2019 +0200
ibusManager: Add call to restart the ibus daemon
We may need to restart it with different arguments, so make it
possible to do that. Also, avoid to just restart it on _clear(),
this is now most likely through our --replace call than it is
through ibus-daemon eg. dying, avoids some noise in logs as
there is already an ongoing ibus-daemon.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/680
js/misc/ibusManager.js | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/js/misc/ibusManager.js b/js/misc/ibusManager.js
index 5a2d24e2fb..6c8266271f 100644
--- a/js/misc/ibusManager.js
+++ b/js/misc/ibusManager.js
@@ -59,15 +59,19 @@ var IBusManager = class {
this._spawn();
}
- _spawn() {
+ _spawn(extraArgs = []) {
try {
- Gio.Subprocess.new(['ibus-daemon', '--xim', '--panel', 'disable'],
- Gio.SubprocessFlags.NONE);
+ let cmdLine = ['ibus-daemon', '--panel', 'disable', '--xim', ...extraArgs];
+ Gio.Subprocess.new(cmdLine, Gio.SubprocessFlags.NONE);
} catch (e) {
log(`Failed to launch ibus-daemon: ${e.message}`);
}
}
+ restartDaemon(extraArgs = []) {
+ this._spawn(['-r', ...extraArgs]);
+ }
+
_clear() {
if (this._panelService)
this._panelService.destroy();
@@ -80,8 +84,6 @@ var IBusManager = class {
this._currentEngineName = null;
this.emit('ready', false);
-
- this._spawn();
}
_onConnected() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]