mono / gtk-sharp

Gtk# is a Mono/.NET binding to the cross platform Gtk+ GUI toolkit and the foundation of most GUI apps built with Mono
http://www.mono-project.com/GtkSharp
Other
429 stars 140 forks source link

[Gtk] Replace some glue code with actual pinvokes. #181

Closed Therzok closed 7 years ago

Therzok commented 7 years ago

This fixes GdkWindow leaks when creating your own Window.

The underlying cause is actually setting the value without going via the property setter. That means that any kind of notification isn't being taken into account.

In other words, if anything dependent on the property notification of "window" to do ref-unref, it wouldn't trigger. Using the gtk methods instead of glue code makes the actual notification to trigger.

meebey commented 7 years ago

LGTM except that the gtk_widget_get_window symbol was introduced in GTK+ 2.14, so the minimum build dependency of GTK+ needs to be bumped from 2.12.0 to 2.14.0 in this change as well.

Therzok commented 7 years ago

Sounds good to me, @meebey thanks, I guess this will have to happen, as the leak is pretty severe for MonoDevelop.

meebey commented 7 years ago

Yeah sure, I don't see a problem with bumping the GTK+ version to 2.14 as that was released in 2008, so everybody is using a newer version at runtime anyhow :)

Therzok commented 7 years ago

Superseded by #182