diff --git a/gitypelib.c b/gitypelib.c index 2e5b0e1b2..dcc265119 100644 --- a/gitypelib.c +++ b/gitypelib.c @@ -208,6 +208,17 @@ g_typelib_get_dir_entry_by_gtype (GITypelib *typelib, guint i; const char *c_prefix; + /* There is a corner case regarding GdkRectangle. GdkRectangle is a + boxed type, but it is just an alias to boxed struct + CairoRectangleInt. Scanner automatically converts all references + to GdkRectangle to CairoRectangleInt, so GdkRectangle does not + appear in the typelibs at all, although user code might query it. + So if we get such query, we also change it to lookup of + CairoRectangleInt. + https://bugzilla.gnome.org/show_bug.cgi?id=655423 */ + if (!fastpass && !strcmp (gtype_name, "GdkRectangle")) + gtype_name = "CairoRectangleInt"; + /* Inside each typelib, we include the "C prefix" which acts as * a namespace mechanism. For GtkTreeView, the C prefix is Gtk. * Given the assumption that GTypes for a library also use the