Fix error when restart ibus.
This commit is contained in:
Родитель
a1f880ae4c
Коммит
3ab14d2ab0
|
@ -275,9 +275,10 @@ _ibus_im_client_ibus_open (IBusIMClient *client)
|
|||
|
||||
GList *p;
|
||||
for (p = priv->contexts; p != NULL; p = g_list_next (p)) {
|
||||
IBusIMContext *ctx = IBUS_IM_CONTEXT (p->data);
|
||||
IBusIMContext *context = IBUS_IM_CONTEXT (p->data);
|
||||
const gchar *ic = _ibus_im_client_create_input_context (client);
|
||||
ibus_im_context_set_ic (ctx, ic);
|
||||
g_hash_table_insert (priv->ic_table, g_strdup (ic), context);
|
||||
ibus_im_context_set_ic (context, ic);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -407,7 +407,12 @@ ibus_im_context_set_ic (IBusIMContext *context, const gchar *ic)
|
|||
{
|
||||
IBusIMContextPrivate *priv = context->priv;
|
||||
if (priv->ic) g_free (priv->ic);
|
||||
|
||||
priv->ic = g_strdup (ic);
|
||||
|
||||
if (priv->ic == NULL) {
|
||||
priv->enable = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Загрузка…
Ссылка в новой задаче