Re: More notebook weirdness.



On Tue, Aug 03, 1999 at 03:50:47PM -0400, Owen Taylor wrote:

[...]
> What's going on here is that the notebook violates
> the standard widget-system invariant:
> 
>    widget->parent && GTK_WIDGET_MAPPED (widget->parent) && 
>      GTK_WIDGET_VISIBLE (widget) => GTK_WIDGET_MAPPED (widget)
> 
> Because non-visible pages are VISIBLE, but not MAPPED.
> When a page is shown gtk_widget_real_show() calls
> gtk_widget_map(), but a resize is also called at
> the same time, and when that is processed,
> gtk_notebook_size_request() notices that the page
> should not be shown and hides it again.
> 
> There are various solutions
> 
>  1) Remove the invariant and the code in gtk_widget_real_show()
>     enforcing it ... make each container responsible for 
>     mapping its children if necessary. This seems poor in
>     that it would break compatibility with existing containers.

I like this solution, because it is the responsibility
of the parent.

>  2) Give each page of the notebook its own GdkWindow. This
>     way, the children can be left mapped all the time
>     and only their parent-windows hidden and shown.

In this case tab_label needs its own GdkWindows too - at least in case
of scrollable notebooks.

>  3) Add an additional flag which means something like
>     "parent wants this widget to be mapped".

I think this is only the hack to avoid 1).

bye,
  Lars



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