- Update gnome-shell-disable-ibus-when-not-installed.patch: Remove error in journal log(bsc#1169029). OBS-URL: https://build.opensuse.org/request/show/792827 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-shell?expand=0&rev=422
39 lines
1.1 KiB
Diff
39 lines
1.1 KiB
Diff
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(+)
|
|
|
|
diff --git a/js/misc/ibusManager.js b/js/misc/ibusManager.js
|
|
index e43f88c..9d16f09 100644
|
|
--- a/js/misc/ibusManager.js
|
|
+++ b/js/misc/ibusManager.js
|
|
@@ -31,6 +31,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
|
|
@@ -59,6 +63,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];
|
|
Gio.Subprocess.new(cmdLine, Gio.SubprocessFlags.NONE);
|
|
--
|
|
2.26.0
|
|
|