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
This commit is contained in:
parent
9194de8460
commit
8be95b5785
@ -59,15 +59,19 @@ var IBusManager = class {
|
|||||||
this._spawn();
|
this._spawn();
|
||||||
}
|
}
|
||||||
|
|
||||||
_spawn() {
|
_spawn(extraArgs = []) {
|
||||||
try {
|
try {
|
||||||
Gio.Subprocess.new(['ibus-daemon', '--xim', '--panel', 'disable'],
|
let cmdLine = ['ibus-daemon', '--panel', 'disable', '--xim', ...extraArgs];
|
||||||
Gio.SubprocessFlags.NONE);
|
Gio.Subprocess.new(cmdLine, Gio.SubprocessFlags.NONE);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
log(`Failed to launch ibus-daemon: ${e.message}`);
|
log(`Failed to launch ibus-daemon: ${e.message}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
restartDaemon(extraArgs = []) {
|
||||||
|
this._spawn(['-r', ...extraArgs]);
|
||||||
|
}
|
||||||
|
|
||||||
_clear() {
|
_clear() {
|
||||||
if (this._panelService)
|
if (this._panelService)
|
||||||
this._panelService.destroy();
|
this._panelService.destroy();
|
||||||
@ -80,8 +84,6 @@ var IBusManager = class {
|
|||||||
this._currentEngineName = null;
|
this._currentEngineName = null;
|
||||||
|
|
||||||
this.emit('ready', false);
|
this.emit('ready', false);
|
||||||
|
|
||||||
this._spawn();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_onConnected() {
|
_onConnected() {
|
||||||
|
Loading…
Reference in New Issue
Block a user