File gnome-shell-disable-ibus-when-not-installed.patch of Package gnome-shell.26665

From 29dfda2d2f77d14e27cc27cbba1e41ec0363cf83 Mon Sep 17 00:00:00 2001
From: Xiaoguang Wang <xwang@suse.com>
Date: Thu, 9 Apr 2020 11:16:56 +0800
Subject: [PATCH] Disable ibus when out of CJK

---
 js/misc/ibusManager.js | 8 ++++++++
 1 file changed, 8 insertions(+)

Index: gnome-shell-41.5/js/misc/ibusManager.js
===================================================================
--- gnome-shell-41.5.orig/js/misc/ibusManager.js
+++ gnome-shell-41.5/js/misc/ibusManager.js
@@ -40,6 +40,10 @@ function getIBusManager() {
 
 var IBusManager = class {
     constructor() {
+        let daemon = Gio.File.new_for_path('/usr/bin/ibus-daemon');
+        if (!daemon.query_exists(null))
+            return;
+
         IBus.init();
 
         // This is the longest we'll keep the keyboard frozen until an input
@@ -68,6 +72,10 @@ var IBusManager = class {
     }
 
     _spawn(extraArgs = []) {
+        let daemon = Gio.File.new_for_path('/usr/bin/ibus-daemon');
+        if (!daemon.query_exists(null))
+            return;
+
         try {
             let cmdLine = ['ibus-daemon', '--panel', 'disable', ...extraArgs];
             let launcher = Gio.SubprocessLauncher.new(Gio.SubprocessFlags.NONE);
openSUSE Build Service is sponsored by