Re: rendering-cleanup-next
- From: Benjamin Otte <otte gnome org>
- To: Havoc Pennington <hp pobox com>
- Cc: gtk-devel-list <gtk-devel-list gnome org>
- Subject: Re: rendering-cleanup-next
- Date: Wed, 15 Sep 2010 03:25:07 +0200
Fixed in http://git.gnome.org/browse/gtk+/commit/?h=rendering-cleanup-next&id=99f0da58168e3db6cdf8c27c4239afc600bef058
Thanks for pointing out that flag, I never realized it exists.
Benjamin
On Wed, Sep 15, 2010 at 2:36 AM, Havoc Pennington <hp pobox com> wrote:
> Hi,
>
> On Tue, Sep 14, 2010 at 7:42 PM, Benjamin Otte <otte gnome org> wrote:
>> I'm actually not sure about that. First, we don't have any code that
>> defines if an allocation is valid or even defines what a "valid"
>> allocation is. Or do we? gtk_widget_get_allocation() at least doesn't
>> do anything there.
>
> yes, we have GTK_WIDGET_ALLOC_NEEDED(). draw() should whine if an
> alloc is needed.
>
> I don't think there's much question here. Drawing without an updated
> allocation is just a bug, plain and simple.
>
> Widgets need this guarantee. For example if I'm coding GtkLabel, I
> should be able to create the PangoLayout in size_allocate and assume
> that I have the right layout in draw().
> If you don't require updating the allocation, I might draw() some old
> text that has been changed.
>
> (Not saying GtkLabel works this way, I didn't look, just that if it
> did work this way it would be correct and would have worked in GTK
> 2.x. And it's certainly easier to write a correct widget if we keep
> this invariant.)
>
> Havoc
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]