GNOME Bugzilla – Bug 748832
Remove special GdkRectangle case when scanning/reading girepository data
Last modified: 2015-11-05 14:05:13 UTC
Following https://bugzilla.gnome.org/show_bug.cgi?id=723394 the property "pointing-to" of GtkPopover became unsettable through Gjs with the following error : Gjs-WARNING **: JS ERROR: TypeError: Object is of type cairo.RectangleInt - cannot convert to GdkRectangle This is because this change made a different between what is returned from introspection data (Cairo.RectangleInt) and when the GObject property gtype is (GdkRectangle). I'm proposing to simply the current situation by removing this automatic conversion from gobject-introspection, and introducing a ifdef at introspection time in Gdk which will define the GdkRectangle structure to help the parser.
Created attachment 302796 [details] [review] scanner/girepository: remove GdkRectangle->CairoRectangleInt automatic conversion
This GTK+ bug : https://bugzilla.gnome.org/show_bug.cgi?id=748833
Review of attachment 302796 [details] [review]: Looks right to me.
Should I wait for one of the maintainer to review this patch?
Since the GDK patch landed, I think we should land this one as well; we're still in time to catch regressions and revert it.
Review of attachment 302796 [details] [review]: Thanks, pushed to master.
Adding Colin, as recommended by Emmanuele.
This breaks us on Ubuntu where we're using g-i 1.46 with gtk 3.16. pygobject has a test which checks the type of a GdkRectangle (test_class_closure_override_with_aliased_type) which now fails: AssertionError: <GdkRectangle at 0x2e3a3c0> is not an instance of <class 'gi.repository.cairo.RectangleInt'> It seems that this fix was required as a result of 2495edc9fdd604fa9f052b4003a492d2b7230d37 in gtk+ - so is there any way we can conditionalise the code to < 3.17.1?