GNOME Bugzilla – Bug 11821
gtk_window_list_toplevels() is inconsistent
Last modified: 2011-02-04 16:09:25 UTC
Package: gtk+ Version: 1.3 It's nonstandard in GTK to reference returned objects (a good thing, since CORBA/Mozilla have both experienced tons of memleaks with the other policy), list_toplevels() should IMO be consistent with container_get_children() and with all the functions that return a single object. Havoc ------- Bug moved to this database by debbugs-export@bugzilla.gnome.org 2001-01-27 14:48 ------- This bug was previously known as bug 11821 at http://bugs.gnome.org/ http://bugs.gnome.org/show_bug.cgi?id=11821 Originally filed under the gtk+ product and general component. Reassigning to the default owner of the component, gtk-bugs@gtk.org.
I feel like we probably discussed this a while ago, someone should find the discussion and link it here.
Put all GTK 1.3.x bugs on 2.0.0 milestone
Setting API-affecting bugs to the API freeze milestone
Tim is this OK to fix? You and Owen need to work this out.
I tried to find the discussion, but couldn't find it.
Tim says: well, then make gtk_window_list_toplevels() a private function by prefixing it with "_" and provide a public non-refing variant thereof.
Made following change: Mon Mar 26 15:48:45 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkwindow.c (gtk_window_list_toplevels): Don't reference the widgets in the resulting list. (#11821) This makes this consistent with gtk_container_children. * gtk/gtkwindow.c gtk/gtkwidget.c: Fix up the two uses of gtk_window_list_toplevels. I didn't add the internal function, since it seemed like a silly hyper-optimization. Neither use of gtk_window_list_toplevels() is at all time critical, and the duplicated code is tiny.