GNOME Bugzilla – Bug 50279
gtk_widget_reparent() needs to handle more complex window setups.
Last modified: 2011-02-04 16:09:32 UTC
I think this function still breaks on widgets that create children of their parent container's GdkWindow other than widget->window, e.g. GtkSpinButton. Need to either fix all such widgets and disallow doing that, or change gtk_widget_reparent() to always unrealize the child widget.
Put all GTK 1.3.x bugs on 2.0.0 milestone
I think gtkpspinbutton is pretty broken, but we probably can fix it up, since we have to fix up NO_WINDOW widgets with windows like GtkButton; writing the code to do this (iterating over the children of the parent window for the widget and looking at the user data) isn't all that complex. There was discussion of making reparent() just ref/remove/add/unref, but that's enough of a pain for plug/socket that I don't want to do it. Now, there is a problem that gtk_widget_reparent() doesn't work if the destination window uses gtk_widget_set_parent_window(), but in general the gtk_widget_reparent() API isn't good enough to handle that complexity, because gtk_container_add() doesn't have information about where the child goes, so people should just use ref/remove/add/unref in such cases.
Sat Mar 2 20:58:30 2002 Owen Taylor <otaylor@redhat.com> * gtk/gtkwidget.c (gtk_widget_reparent): Handle NO_WINDOW widgets with windows that are children of widget->window. (#50279)