$GTK_IM_MODULE is ignored
Submitted by hi-..@..dex.ru
Link to original bug (#768412)
Description
After distro upgrade, Compose key for all GTK3 (only) apps produces wrong characters, like if it ignores the GTK_IM_MODULE=xim. E.g.: «Compose + - + space» ought to produce «— », as is set in /.XCompose, but produces «» instead. Other toolkit apps — GTK2 and Qt — works fine.
For testing purposes I created with Glade a window with textbox, and ran against built gtk+-3.20.6 — and I can confirm, the problem still persist.
I tried to debug it myself, and found that in the gtkimmodule.c:970
context_id = lookup_immodule (immodules);
«immodules[0] == "xim"», and lookup_immodule() probably checks if the string is in global variable «contexts_hash» — and returns zero 'cause it isn't. A bit of code later, in the line
return context_id ? context_id : SIMPLE_ID;
the "gtk-im-context-simple" is returned instead of xim.
I think we need to find where the «contexts_hash» is initialized, but I wrongly assumed that hardware watchpoints doesn't work in libs, tried to look trough the code manually, and kinda lost. I think, if nobody would guess what's the problem, I'll try this weekend to debug this again.
Version: 3.20.x