[gnome-shell/wip/carlosg/x11-services-on-demand: 3/4] ibusManager: Add call to restart the ibus daemon



commit 0a29ff416e0b0c910ae8ec1d8b2c00301c2cf0bd
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.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/680

 js/misc/ibusManager.js | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/js/misc/ibusManager.js b/js/misc/ibusManager.js
index 5a2d24e2fb..7abcd33242 100644
--- a/js/misc/ibusManager.js
+++ b/js/misc/ibusManager.js
@@ -59,15 +59,22 @@ 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'];
+            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'];
+        args = args.concat(extraArgs);
+        this._spawn(args);
+    }
+
     _clear() {
         if (this._panelService)
             this._panelService.destroy();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]