Merge branch 'issue-61' into 'gtk-3-24'

Ensure we have a client window before using it

See merge request GNOME/gtk!1194
This commit is contained in:
Matthias Clasen 2019-11-18 01:15:10 +00:00
commit 75475effb1

View File

@ -650,6 +650,9 @@ gtk_im_context_xim_filter_keypress (GtkIMContext *context,
GdkWindow *window;
XKeyPressedEvent xevent;
if (context_xim->client_window == NULL)
return FALSE;
if (event->type == GDK_KEY_RELEASE && !context_xim->filter_key_release)
return FALSE;
@ -1344,6 +1347,9 @@ gtk_im_context_xim_get_ic (GtkIMContextXIM *context_xim)
if (context_xim->im_info == NULL || context_xim->im_info->im == NULL)
return NULL;
if (context_xim->client_window == NULL)
return NULL;
if (!context_xim->ic)
{
const char *name1 = NULL;