GNOME Bugzilla – Bug 133896
XGetWindowProperty and mismatched types
Last modified: 2020-11-06 20:06:13 UTC
GetWindowProperty has very strange behavior when the requested type doesn't match the actual type * It returns the actual type to actual_type_return * It returns 0 to *nitems_return * It stores a 1-byte string containing \0 that needs to be XFree'ed into *prop_return. xprops.c:get_property() is buggy here, most likely other uses of GetWindowProperty are buggy also. The asynchronous property retrieval code should be checked as well. (I found bugs in the handling of this all over GTK+, thought I'd file a bug here)
xprops.c:get_property() appears to have left this earth sometime during the 2.12 days, but many other functions in xprops.c call XGetWindowProperty(). I am thinking we need some kind of wrapper, then. (yes, speedy triage here)
Some additional notes: Kjartan fixed up a few of these that he caught with valgrind; there may not be any actual current bugs, though I agree a wrapper might prevent future ones. I also tried reading over a few of these a couple different times, but got distracted before getting through all of them each time, and thus never got around to closing the bug out. *shrug*
bugzilla.gnome.org is being replaced by gitlab.gnome.org. We are closing all old bug reports in Bugzilla which have not seen updates for many years. If you can still reproduce this issue in a currently supported version of GNOME (currently that would be 3.38), then please feel free to report it at https://gitlab.gnome.org/GNOME/metacity/-/issues/ Thank you for reporting this issue and we are sorry it could not be fixed.