Re: questions re: aux info, size request



Hi,

On Mon, Sep 13, 2010 at 7:06 AM, Tristan Van Berkom
<tristanvb openismus com> wrote:
> Heh, do you mean GtkWindow widgets or GtkWidgets that have their own
> GdkWindow ?

Widgets that have their own GdkWindow

i.e. I was proposing that when adjusting a size request,

if (gtk_widget_get_window(widget))
{
  if (*minimum_size < 1) *minimum_size = 1
}

> I think essentially to allow 0x0 allocations we either need to
> allow GdkWindows to be created at a 0x0 size (currently they
> also force >= 1x1 internally)... or we need to add some special casing
> code to GtkWidget's to handle their GdkWindows with care at
> allocation time (naturally they all just call gdk_window_move_resize()
> unconditionally).

If you force the 1x1 request then in theory you would not ever get a
0x0 allocation, right? But to be sure could also force 1x1 allocation
(which is already done), but change that requirement to only apply if
gtk_widget_get_window() != NULL

I was proposing this approach - window widgets must be 1x1 - because
the alternative is to unmap when receiving a 0x0 allocation.
(HippoCanvas does the unmap thing, in fact 0x0 allocation and unmapped
are the same state in HippoCanvas, iirc.) I think the unmap-on-0x0
will be complicated to apply to GTK and maybe not that useful, since
the goal is to get rid of window widgets, keeping only the ones that
truly conceptually have a GdkWindow - toplevels and embeds - and
requiring toplevels to be 1x1 is actually logical.

Anyway the basic idea is to avoid changing anything too much, just
move the arbitrary 1x1 requirement only to those widgets that really
need it (those that have a GdkWindow)

Havoc


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