forked from AuroraMiddleware/gtk
immodule: Fix context ID lookup on module with multiple contexts
https://bugzilla.gnome.org/show_bug.cgi?id=690247
This commit is contained in:
parent
461c3835aa
commit
b01f90b8d1
@ -658,12 +658,14 @@ lookup_immodule (gchar **immodules_list)
|
||||
if (g_strcmp0 (*immodules_list, SIMPLE_ID) == 0)
|
||||
return SIMPLE_ID;
|
||||
else
|
||||
{
|
||||
GtkIMModule *module;
|
||||
module = g_hash_table_lookup (contexts_hash, *immodules_list);
|
||||
if (module)
|
||||
return module->contexts[0]->context_id;
|
||||
}
|
||||
{
|
||||
gboolean found;
|
||||
gchar *context_id;
|
||||
found = g_hash_table_lookup_extended (contexts_hash, *immodules_list,
|
||||
&context_id, NULL);
|
||||
if (found)
|
||||
return context_id;
|
||||
}
|
||||
immodules_list++;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user