2020-04-15 20:17:15 +02:00
|
|
|
From 29dfda2d2f77d14e27cc27cbba1e41ec0363cf83 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Xiaoguang Wang <xwang@suse.com>
|
|
|
|
Date: Thu, 9 Apr 2020 11:16:56 +0800
|
2019-04-18 15:50:39 +02:00
|
|
|
Subject: [PATCH] Disable ibus when out of CJK
|
|
|
|
|
|
|
|
---
|
2020-04-15 20:17:15 +02:00
|
|
|
js/misc/ibusManager.js | 8 ++++++++
|
|
|
|
1 file changed, 8 insertions(+)
|
2019-04-18 15:50:39 +02:00
|
|
|
|
2023-10-23 16:05:05 +02:00
|
|
|
Index: gnome-shell-45.0/js/misc/ibusManager.js
|
2020-04-18 00:56:08 +02:00
|
|
|
===================================================================
|
2023-10-23 16:05:05 +02:00
|
|
|
--- gnome-shell-45.0.orig/js/misc/ibusManager.js
|
|
|
|
+++ gnome-shell-45.0/js/misc/ibusManager.js
|
|
|
|
@@ -59,6 +59,10 @@ class IBusManager extends Signals.EventE
|
2019-04-18 15:50:39 +02:00
|
|
|
constructor() {
|
2023-10-23 16:05:05 +02:00
|
|
|
super();
|
|
|
|
|
2016-08-12 11:41:51 +02:00
|
|
|
+ let daemon = Gio.File.new_for_path('/usr/bin/ibus-daemon');
|
|
|
|
+ if (!daemon.query_exists(null))
|
|
|
|
+ return;
|
|
|
|
+
|
2018-03-09 11:05:57 +01:00
|
|
|
IBus.init();
|
2016-08-12 11:41:51 +02:00
|
|
|
|
2019-04-18 15:50:39 +02:00
|
|
|
// This is the longest we'll keep the keyboard frozen until an input
|
2023-10-23 16:05:05 +02:00
|
|
|
@@ -114,6 +118,10 @@ class IBusManager extends Signals.EventE
|
2020-04-15 20:17:15 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
_spawn(extraArgs = []) {
|
|
|
|
+ let daemon = Gio.File.new_for_path('/usr/bin/ibus-daemon');
|
|
|
|
+ if (!daemon.query_exists(null))
|
|
|
|
+ return;
|
|
|
|
+
|
|
|
|
try {
|
2023-10-23 16:05:05 +02:00
|
|
|
const cmdLine = ['ibus-daemon', '--panel', 'disable', ...extraArgs];
|
|
|
|
const launchContext = global.create_app_launch_context(0, -1);
|