ibus/ibus-xx-g-s-disable-preedit.patch
2012-07-17 19:27:02 +09:00

33 lines
1.0 KiB
Diff

From 027e4a40a37601c6733a8911fd3949a9310b0258 Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
Date: Wed, 9 May 2012 19:15:00 +0900
Subject: [PATCH] Added a workaround to disable preedit in gnome-shell
https://bugzilla.gnome.org/show_bug.cgi?id=658420
---
client/gtk2/ibusimcontext.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/client/gtk2/ibusimcontext.c b/client/gtk2/ibusimcontext.c
index 584b92d..c4c61d3 100644
--- a/client/gtk2/ibusimcontext.c
+++ b/client/gtk2/ibusimcontext.c
@@ -584,6 +584,14 @@ ibus_im_context_init (GObject *obj)
#else
ibusimcontext->caps = IBUS_CAP_PREEDIT_TEXT | IBUS_CAP_FOCUS;
#endif
+ if (!g_getenv ("IBUS_GNOME_SHELL_ENABLE_PREEDIT_TEXT")) {
+ const gchar * prgname = g_get_prgname ();
+ if (g_strcmp0 (prgname, "gnome-shell") == 0) {
+ if (ibusimcontext->caps & IBUS_CAP_PREEDIT_TEXT) {
+ ibusimcontext->caps ^= IBUS_CAP_PREEDIT_TEXT;
+ }
+ }
+ }
// Create slave im context
--
1.7.10.4