[gnome-shell/wip/carlosg/xwayland-startup-side-channel: 1/2] ibusManager: Use setup X11 display for ibus-x11



commit 83228e25175e6e62dba3b3f055cfc90499c24816
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sat Feb 29 18:43:28 2020 +0100

    ibusManager: Use setup X11 display for ibus-x11
    
    (re)spawning ibus to get ibus-x11 will be part atm of Xwayland
    initialization process. For it to be set up before the client
    it needs using the GNOME_SETUP_DISPLAY.

 js/misc/ibusManager.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/js/misc/ibusManager.js b/js/misc/ibusManager.js
index cc699c33c2..feb74f123d 100644
--- a/js/misc/ibusManager.js
+++ b/js/misc/ibusManager.js
@@ -61,7 +61,10 @@ var IBusManager = class {
     _spawn(extraArgs = []) {
         try {
             let cmdLine = ['ibus-daemon', '--panel', 'disable', ...extraArgs];
-            Gio.Subprocess.new(cmdLine, Gio.SubprocessFlags.NONE);
+            let launcher = Gio.SubprocessLauncher.new(Gio.SubprocessFlags.NONE);
+            // Forward the right X11 Display for ibus-x11
+            launcher.setenv('DISPLAY', GLib.getenv('GNOME_SETUP_DISPLAY'), true);
+            launcher.launch(cmdLine);
         } catch (e) {
             log(`Failed to launch ibus-daemon: ${e.message}`);
         }


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