Fixed a bug in gdk_property_get, I think, and made error messages sane

This commit is contained in:
Elliot Lee 1997-11-28 03:10:25 +00:00
parent 8d073b0232
commit ebdcd27f15
2 changed files with 18 additions and 4 deletions

View File

@ -95,17 +95,24 @@ gdk_property_get (GdkWindow *window,
&ret_nitems, &ret_bytes_after,
&ret_data);
if ((ret_prop_type == None) && (ret_format == 0))
if ((ret_prop_type == None) && (ret_format == 0)) {
g_warning("XGetWindowProperty failed\n");
return FALSE;
}
if (actual_property_type)
*actual_property_type = ret_prop_type;
if (actual_format_type)
*actual_format_type = ret_format;
if (ret_prop_type != property)
if (ret_prop_type != type)
{
gchar *rn, *pn;
XFree (ret_data);
rn = gdk_atom_name(ret_prop_type);
pn = gdk_atom_name(type);
g_warning("Couldn't match property type %s to %s\n", rn, pn);
g_free(rn); g_free(pn);
return FALSE;
}

View File

@ -95,17 +95,24 @@ gdk_property_get (GdkWindow *window,
&ret_nitems, &ret_bytes_after,
&ret_data);
if ((ret_prop_type == None) && (ret_format == 0))
if ((ret_prop_type == None) && (ret_format == 0)) {
g_warning("XGetWindowProperty failed\n");
return FALSE;
}
if (actual_property_type)
*actual_property_type = ret_prop_type;
if (actual_format_type)
*actual_format_type = ret_format;
if (ret_prop_type != property)
if (ret_prop_type != type)
{
gchar *rn, *pn;
XFree (ret_data);
rn = gdk_atom_name(ret_prop_type);
pn = gdk_atom_name(type);
g_warning("Couldn't match property type %s to %s\n", rn, pn);
g_free(rn); g_free(pn);
return FALSE;
}