Hi Guix, with these patches different versions of GTK+ can be given different input method module caches.
Currently, the problem with additional GTK input methods (such as IBus) is that to make them visible you need to generate a cache file and point to it with GTK_IM_MODULE_FILE. Since this variable is respected by both major versions of GTK+ (and the cache file doesn't allow specification of input method modules for specific versions of GTK+) incompatible input method modules will be loaded, which results in crashes. By splitting GTK_IM_MODULE_FILE into GUIX_GTK2_IM_MODULE_FILE and GUIX_GTK3_IM_MODULE_FILE we can bypass this problem as GTK+ applications will only load modules compatible with their major version. I've tested this by generating two cache files for both versions with "gtk-query-immodules-2.0" and "gtk-query-immodules-3.0" and setting the variables. This allows me to use IBus libpinyin in all (tested) GTK applications. What doesn't yet work is IBus input methods using the simple engine, such as Arabic, but this seems unrelated. ~~ Ricardo Ricardo Wurmus (2): gnu: gtk+-2: Add patch to support GUIX_GTK2_IM_MODULE_FILE. gnu: gtk+: Add patch to support GUIX_GTK3_IM_MODULE_FILE. gnu/local.mk | 2 ++ gnu/packages/gtk.scm | 4 +++- .../patches/gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch | 15 +++++++++++++++ .../patches/gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch | 15 +++++++++++++++ 4 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch create mode 100644 gnu/packages/patches/gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch -- 2.9.2