diff options
author | Elliot Lee <sopwith@src.gnome.org> | 1997-11-28 03:10:25 +0000 |
---|---|---|
committer | Elliot Lee <sopwith@src.gnome.org> | 1997-11-28 03:10:25 +0000 |
commit | ebdcd27f1569045a2e608d71c12b1dbca1b0d3d1 (patch) | |
tree | 0e193289f0cbd344e35c990ab40bcb719a44bf3e /gdk | |
parent | 8d073b0232fd2b299df53b98bc08181f51dc2598 (diff) | |
download | gtk+-ebdcd27f1569045a2e608d71c12b1dbca1b0d3d1.tar.gz |
Fixed a bug in gdk_property_get, I think, and made error messages sane
Diffstat (limited to 'gdk')
-rw-r--r-- | gdk/gdkproperty.c | 11 | ||||
-rw-r--r-- | gdk/x11/gdkproperty-x11.c | 11 |
2 files changed, 18 insertions, 4 deletions
diff --git a/gdk/gdkproperty.c b/gdk/gdkproperty.c index 35d8a50cf1..64cb513141 100644 --- a/gdk/gdkproperty.c +++ b/gdk/gdkproperty.c @@ -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; } diff --git a/gdk/x11/gdkproperty-x11.c b/gdk/x11/gdkproperty-x11.c index 35d8a50cf1..64cb513141 100644 --- a/gdk/x11/gdkproperty-x11.c +++ b/gdk/x11/gdkproperty-x11.c @@ -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; } |