Commit ebdcd27f authored by Elliot Lee's avatar Elliot Lee
Browse files

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

parent 8d073b02
......@@ -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;
}
......
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment