After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 603559 - gtk should handle missing immodules better
gtk should handle missing immodules better
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Input Methods
2.18.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
: 528708 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-12-02 06:36 UTC by Jens Petersen
Modified: 2012-01-31 02:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (1.47 KB, patch)
2010-04-15 05:06 UTC, Akira TAGOH
none Details | Review
revised patch (2.33 KB, patch)
2011-08-05 09:28 UTC, Akira TAGOH
needs-work Details | Review
take 2 (3.50 KB, patch)
2011-10-31 09:56 UTC, Akira TAGOH
accepted-commit_now Details | Review
Allow fallback for input method modules (4.11 KB, patch)
2011-11-05 05:49 UTC, Matthias Clasen
committed Details | Review

Description Jens Petersen 2009-12-02 06:36:30 UTC
In multilib systems it can happen easily that a third-party
immodule is installed for one arch but not the other say.

In this case what should gtk do?  The current behaviour
looks undetermined or fragile at best with apps potentially
having startup delays etc.

One approach that might help with this might be to allow
GTK_IM_MODULE to hold a colon separated list of immodules
to fallback too, and would also allow distro to handle
fallbacks in a more painless way.

FWIW Qt has done fallback to its default XIM immodule
smoothly for a long time.

See also https://bugzilla.redhat.com/show_bug.cgi?id=452938
for a bit more earlier discussion.
Comment 1 Akira TAGOH 2010-04-15 05:06:05 UTC
Created attachment 158779 [details] [review]
proposed patch
Comment 2 Akira TAGOH 2011-05-24 12:28:35 UTC
ping?
Comment 3 Akhil Laddha 2011-07-07 05:50:27 UTC
Jens, can you please confirm if the patch fixes your issue ?
Comment 4 Jens Petersen 2011-07-22 10:28:21 UTC
The patch still applies to recent gtk2 and gtk3 releases.

I tested on gtk3-3.1.8 with GTK_IM_MODULE=gtk:xim
and it doesn't seem to work for me unfortunately.
I could be missing something?

Akira, could you also try testing?
Comment 5 Jens Petersen 2011-07-22 10:30:54 UTC
GTK_IM_MODULE=scim:xim (with no scim installed) works though.
Comment 6 Akira TAGOH 2011-08-05 09:28:51 UTC
Created attachment 193297 [details] [review]
revised patch

tested for all the above case and works fine.
Comment 7 Akira TAGOH 2011-09-14 01:25:23 UTC
ping?
Comment 8 Vincent Untz 2011-10-12 07:11:35 UTC
Patch makes sense to me.

Can we get this in?
Comment 9 Matthias Clasen 2011-10-28 14:27:31 UTC
Review of attachment 193297 [details] [review]:

I don't think this is an improvement to the user experience, really.
Randomly switching between scim and xim is just as much of a failure as randomly switching between ibus and simple.

The proper fix is to standardize on one im framework, and really integrate it as a mandatory component of the desktop.

That being said, this patch looks harmless enough. You need to update the documentation to reflect the new syntax, though,
in two places: 

- the GtkSettings:gtk-im-module docs in gtk/gtksettings.c 

- the GTK_IM_MODULE docs in docs/reference/gtk/running.sgml
Comment 10 Akira TAGOH 2011-10-31 09:56:18 UTC
Created attachment 200324 [details] [review]
take 2

Thanks for reviewing. added an attach to update the doc.

FWIW this is the multilib issue and not relevant to the desktop integration. I still think this would be reasonable solution so far because no one propose anything else; IMHO the above suggestion will still fails unless we get rid of the immodule mechanism, because even if standardizing IM and integrating into the desktop, this issue is still persist if one forgets to install either of 32bit/64bit binary for immodule, because the way to determine the fallback on current implementation is unreliable.

The cache file like gtk.immodules and immodules.cache considered harmful because the order of the list is really important and hardly affects to the fallback though, it's uncontrollable really, anyway.

I want to see any reliable method to determine the default IM on GTK+.
Comment 11 Matthias Clasen 2011-11-01 13:48:59 UTC
Review of attachment 200324 [details] [review]:

Looks ok
Comment 12 Matthias Clasen 2011-11-01 13:51:01 UTC
(In reply to comment #10)
> Created an attachment (id=200324) [details] [review]
> take 2
> 
> Thanks for reviewing. added an attach to update the doc.
> 
> FWIW this is the multilib issue and not relevant to the desktop integration. I
> still think this would be reasonable solution so far because no one propose
> anything else; IMHO the above suggestion will still fails unless we get rid of
> the immodule mechanism, because even if standardizing IM and integrating into
> the desktop, this issue is still persist if one forgets to install either of
> 32bit/64bit binary for immodule, because the way to determine the fallback on
> current implementation is unreliable.

Sure, multilib is a whole another level of failure... but 'integration' will  also mean to arrange things so that it is damn well impossible to 'forget to install either'.
Comment 13 Matthias Clasen 2011-11-05 05:49:18 UTC
The following fix has been pushed:
4d7e47d Allow fallback for input method modules
Comment 14 Matthias Clasen 2011-11-05 05:49:22 UTC
Created attachment 200740 [details] [review]
Allow fallback for input method modules

Accept a :-separated list of module names in GTK_IM_MODULE and
the corresponding setting, to deal a bit better with broken
situations.
Comment 15 Akira TAGOH 2012-01-31 02:59:21 UTC
*** Bug 528708 has been marked as a duplicate of this bug. ***