XIM: gracefully deal with non-X backends

Patch by Young-Ho Cha, bug 660309.
This commit is contained in:
Matthias Clasen 2011-12-29 23:43:28 -05:00
parent 3c70a12785
commit ebd28de588

View File

@ -650,6 +650,8 @@ gtk_im_context_xim_new (void)
GtkIMContextXIM *result;
const gchar *charset;
if (!GDK_IS_X11_DISPLAY(gdk_display_get_default()))
return NULL;
result = g_object_new (GTK_TYPE_IM_CONTEXT_XIM, NULL);
result->locale = g_strdup (setlocale (LC_CTYPE, NULL));