From 027e4a40a37601c6733a8911fd3949a9310b0258 Mon Sep 17 00:00:00 2001 From: fujiwarat 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