Re: [gtk-list] Re: Reparenting bug




On Thu, 22 Jul 1999, Joshua Richardson wrote:
> 
> As the well-known Havoc recently told me, gtk_widget_reparent is an
> internal function, and shouldn't be called from application code.  Perhaps
> gtk_container_remove()/gtk_container_add() would work the way you
> expected....
> 

Except I think I was insane, because it doesn't look like an internal
function; it's an alternative to
gtk_container_add()/gtk_container_remove() that potentially saves
unrealizing the child.

Are you sure that wasn't gtk_widget_unparent() I told you about? (Havoc
desperately tries to be less wrong :-)

Anyway, I think the problem is that GtkSpinButton has two subwindows that
are direct children of its parent's windows, so gtk_widget_reparent()'s
attempt to reparent widget->window and save an unrealize leaves the
subwindow containing the little arrows behind. Using
container_remove()/container_add() will be a nice workaround, but this is
really a Gtk bug, I think. At least, I"m guessing that that's the problem.

Havoc




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]