ibus/ibus-xx-g-s-disable-preedit.patch
2013-01-15 19:02:41 +09:00

34 lines
1.1 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
@@ -645,6 +645,15 @@ ibus_im_context_init (GObject *obj)
ibusimcontext->events_queue = g_queue_new ();
+ 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
ibusimcontext->slave = gtk_im_context_simple_new ();
gtk_im_context_simple_add_table (GTK_IM_CONTEXT_SIMPLE (ibusimcontext->slave),
--
1.7.10.4