Re: rendering-cleanup-next

On Sat, Sep 11, 2010 at 7:05 PM, Havoc Pennington <hp pobox com> wrote:
> I'm looking at gtk_scale_draw for example on your branch
gtk_scale_get_layout_offsets() returns values relative to
widget->window, so takes into account the allocation.

This is actually a rather ugly situation right now: Everything in the
widget but the draw function (key press events etc) uses coordinates
relative to the GdkWindow, only the draw function doesn't. So when
calling internal get_offsets() style APIs, the draw function always
has to subtract the allocation again.

I cannot really change the behavior though, because when calling
gtk_widget_draw() the widget needs to paint the contents of all GDK
windows it owns, so the drawing needs to be relative to oe point, not
multiple different ones (the origins of all the windows). And I think
it's best to rely on allocation.x/y, even if all the other events


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