Re: IM-related issues on openSUSE 12.1 Beta

Takashi Iwai <[email protected]>
Newsgroups gmane.linux.suse.m17n
Message-ID <s5hd3e3wwha.wl%[email protected]>
At Mon, 10 Oct 2011 19:54:41 +0200,
Takashi Iwai wrote:
> 
> >  > A simple patch like below might work?  Then we can set xim to
> >  > GTK3_IM_MODULE while scim to GTK_IM_MODULE.
> >  > I created a branch and building the package now for testing in
> >  > OBS home:tiwai:branches:GNOME:Factory/gtk3 repo.
> >  > Can anyone check (sorry I have no time right now).
> > 
> >  > But the problem isn't only about SCIM but may hit other IMs, too.
> >  > So, a fallback mechanism would be nicer.
> > 
> > Very simple patch!
> > 
> > I set variables like:
> > GTK3_IM_MODULE=xim
> > GTK_IM_MODULE=scim-bridge
> > XMODIFIERS="@im=SCIM"
> > 
> > It works fine for gedit (Gtk3, fall back to xim), firefox and chromium 
> > (Gtk2).
> 
> Good to hear.
> 
> Vincent, what do you think?  Can it be accepted to the upstream and
> eventually put into 12.1?

Vincent?  Or anyone else?  I attach the patch again.

[The problem is that some input methods don't provide gtk3 but only
 gtk2 im-modules.  When $GTK_IM_MODULE is set to such a module, gtk3
 can't take it then chooses another available IM randomly, or nothing
 is available.  The patch changes gtk3 to take a look at
 $GTK3_IM_MODULE first, so that the user can set a value specific to
 gtk3.  With the patch, setting GTK3_IM_MODULE=xim gives a nice
 workaround.]


thanks,

Takashi

---
 gtk/gtkimmodule.c |    6 ++++++
 1 file changed, 6 insertions(+)

--- a/gtk/gtkimmodule.c
+++ b/gtk/gtkimmodule.c
@@ -672,6 +672,12 @@
   if (!contexts_hash)
     gtk_im_module_initialize ();
 
+  envvar = g_getenv ("GTK3_IM_MODULE");
+  if (envvar &&
+      (strcmp (envvar, SIMPLE_ID) == 0 ||
+       g_hash_table_lookup (contexts_hash, envvar))) 
+    return envvar;
+
   envvar = g_getenv ("GTK_IM_MODULE");
   if (envvar &&
       (strcmp (envvar, SIMPLE_ID) == 0 ||
-- 
To unsubscribe, e-mail: [email protected]
To contact the owner, e-mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.