Re: gtk viewport unrealize



On Fri, 2004-06-18 at 14:47, Mathieu Lacage wrote:
> hi,
> 
> While debugging some open gl problems of mine, I stumbled upon
> gtk_viewport_unrealize which destroys its windows before chaining up to
> its parent. The chain up ends in gtk_widget_real_unrealize where a big
> comment states that the unrealize handler of the children must be
> invoked before that of the parent. To enforce this, it does an explicit
> test whether or not it is a container and then calls each of the
> container's children unrealize handler.
> 
> I wonder if it would not make sense to change the way the
> gtk_viewport_unrealize handler works to make sure it chains up before
> destroying its internal windows. 
> 
> This seems to fix a lot of problems in my opengl drawing area which is
> stored in a viewport...

Hmm,

 - The comment is pretty old; we tend to be more robust these days;
   but it's not unlikely that the OpenGL wrapper code doesn't have the
   necessary checks to prevent bad things when operating on destroyed
   windows. (They should be still referenced, just that the X 
   counterpart is gone. GDK is full of GDK_WINDOW_DESTROYED() checks.)

 - I wouldn't want to change this on the stable branch; I think there
   is considerable potential for unexpected breakage; I can't think
   of a way off-hand that people would be depending on the current
   order, but that doesn't mean there isn't one.

 - It would need to be done as an audit across all !NO_WINDOW containers
   (there aren't very many - GtkViewport, GtkTreeView, GtkTextView,
   GtkLayout, probably a few more.) Changing it in just one place 
   strikes me as a poor.

 - The issue should be put in bugzilla.

Regards,
						Owen

Attachment: signature.asc
Description: This is a digitally signed message part



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