[gnome-shell/wip/carlosg/x11-services-on-demand: 1/2] 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: 1/2] ibusManager: Add call to restart the ibus daemon
- Date: Thu, 15 Aug 2019 14:35:41 +0000 (UTC)
commit cd08b039cad84894b4fdccdd39a397c4f4064aed
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 | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
---
diff --git a/js/misc/ibusManager.js b/js/misc/ibusManager.js
index 5a2d24e2fb..1263b663e8 100644
--- a/js/misc/ibusManager.js
+++ b/js/misc/ibusManager.js
@@ -59,15 +59,24 @@ 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'];
+ if (extraArgs)
+ cmdLine = cmdLine.concat(extraArgs);
+ Gio.Subprocess.new(cmdLine, Gio.SubprocessFlags.NONE);
} catch (e) {
log(`Failed to launch ibus-daemon: ${e.message}`);
}
}
+ restartDaemon(extraArgs) {
+ let args = ['-r'];
+ if (extraArgs)
+ args = args.concat(extraArgs);
+ this._spawn(args);
+ }
+
_clear() {
if (this._panelService)
this._panelService.destroy();
@@ -80,8 +89,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]