After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 50279 - gtk_widget_reparent() needs to handle more complex window setups.
gtk_widget_reparent() needs to handle more complex window setups.
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
1.3.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2001-01-01 22:15 UTC by Havoc Pennington
Modified: 2011-02-04 16:09 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Havoc Pennington 2001-01-01 22:15:30 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.
Comment 1 Havoc Pennington 2001-01-29 19:39:32 UTC
Put all GTK 1.3.x bugs on 2.0.0 milestone
Comment 2 Owen Taylor 2002-01-23 20:57:04 UTC
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.


Comment 3 Owen Taylor 2002-03-03 02:13:34 UTC
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)