Re: Size allocation and redrawing issues
- From: Soeren Sandmann <sandmann daimi au dk>
- To: Owen Taylor <otaylor redhat com>
- Cc: gtk-devel-list gnome org, timj gtk org, blizzard redhat com
- Subject: Re: Size allocation and redrawing issues
- Date: 01 Nov 2001 12:57:21 +0100
Owen Taylor <otaylor redhat com> writes:
> - gtk_widget_set_redraw_on_alloc() is added as in my original
> mail for widgets that want to handle redrawing on resize
> themself.
If a NO_WINDOW widget is moved, the union of its old and new
allocations is invalidated, whether the widget is REDRAW_ON_ALLOCATE
or not.
I don't think this invalidation should be done automatically for
widgets that are both NO_WINDOW and !REDRAW_ON_ALLOCATE, because of
the many NO_WINDOW containers that don't actually draw anything (hbox,
vbox, hbbox, table, etc). Also, NO_WINDOW widgets such as GtkFrame
that don't draw much can just invalidate two pretty small areas in
their size_allocate implementation.
> - Invalidation when a widget is resized or moved is "shallow" as
> described above - only the windows that need to be invalidated
> are invalidated.
There are still some calls to queue_clear that invalidates
_everything_ on opaque resize, including one in
gtk_widget_queue_resize, so your patch doesn't actually reduce the
amount of redrawing. It is easy to remove this invalidation, though.
Also, I think some operations on GdkWindows could and should
invalidate more than they do currently. Moving or resizing a window
should at a minimum invalidate the uncovered area in their
parents. This would maybe avoid some waiting for expose events.
Søren
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]