Revert "gtk: Mark the Cairo.Context in Widget.Drawn as owned"

This reverts commit 21bfaa7a9d.

After fixing the memory leak when finalizing a Context object in the
previous commit, native crashes would happen when using a Gtk#-based
app. The reason is that this commit tried to fix the leak with the wrong
approach of marking the CairoContext as owned. This avoided the leak by
not incrementing the reference count, but now that the leak is fixed,
cairo_destroy is called one time too much.

The CairoContext passed in the Draw signal is not marked as
transfer-ownership=full in GObject-Introspection metadata. So unmarking
this as owned fixes the "potential double-free" assertion that was
causing the crash.
This commit is contained in:
Andrés G. Aragoneses 2013-11-03 14:01:43 +01:00 committed by Bertrand Lorentz
parent 41eeecbf9a
commit 2967482762

View file

@ -863,7 +863,6 @@
<attr path="/api/namespace/object[@cname='GtkWidget']/signal[@name='Destroy']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkWidget']/signal[@name='Draw']" name="name">Drawn</attr>
<attr path="/api/namespace/object[@cname='GtkWidget']/signal[@cname='draw']" name="manual">true</attr>
<attr path="/api/namespace/object[@cname='GtkWidget']/signal[@cname='draw']/*/*[@name='cr']" name="owned">true</attr>
<attr path="/api/namespace/object[@cname='GtkWidget']/signal[@name='Event']" name="name">WidgetEvent</attr>
<attr path="/api/namespace/object[@cname='GtkWidget']/signal[@name='EventAfter']/*/*[@name='p0']" name="name">event</attr>
<attr path="/api/namespace/object[@cname='GtkWidget']/signal[@name='EventAfter']" name="name">WidgetEventAfter</attr>