Check the result of XGetICValues - it is failing for some reason, and

Tue Feb 24 22:44:01 1998  Owen Taylor  <owt1@cornell.edu>

	* gdk/gdk.c (gdk_ic_get_events): Check the result of
	XGetICValues - it is failing for some reason, and
	causing some warnings to be printed.
This commit is contained in:
Owen Taylor 1998-02-25 03:43:10 +00:00 committed by Owen Taylor
parent c88ea382d2
commit 203476915a
2 changed files with 12 additions and 4 deletions

View File

@ -3537,7 +3537,11 @@ gdk_ic_get_events (GdkIC ic)
private = (GdkICPrivate *) ic;
XGetICValues (private->xic, XNFilterEvents, &xmask, NULL);
if (XGetICValues (private->xic, XNFilterEvents, &xmask, NULL) != NULL)
{
GDK_NOTE (XIM, g_warning ("Call to XGetICValues: %s failed", XNFilterEvents));
return 0;
}
mask = 0;
for (i=0, bit=2; i < nevent_masks; i++, bit <<= 1)
@ -3548,7 +3552,7 @@ gdk_ic_get_events (GdkIC ic)
}
if (xmask)
g_warning ("ic requires the events not supported by the application (%04lx)", xmask);
g_warning ("ic requires events not supported by the application (%#04lx)", xmask);
return mask;
}

View File

@ -3537,7 +3537,11 @@ gdk_ic_get_events (GdkIC ic)
private = (GdkICPrivate *) ic;
XGetICValues (private->xic, XNFilterEvents, &xmask, NULL);
if (XGetICValues (private->xic, XNFilterEvents, &xmask, NULL) != NULL)
{
GDK_NOTE (XIM, g_warning ("Call to XGetICValues: %s failed", XNFilterEvents));
return 0;
}
mask = 0;
for (i=0, bit=2; i < nevent_masks; i++, bit <<= 1)
@ -3548,7 +3552,7 @@ gdk_ic_get_events (GdkIC ic)
}
if (xmask)
g_warning ("ic requires the events not supported by the application (%04lx)", xmask);
g_warning ("ic requires events not supported by the application (%#04lx)", xmask);
return mask;
}