Re: Flicker free GtkLabel
- From: Owen Taylor <otaylor redhat com>
- To: gtk-devel-list redhat com
- Subject: Re: Flicker free GtkLabel
- Date: 17 Oct 1998 10:53:08 -0400
Miguel de Icaza <email@example.com> writes:
> Hello Owen,
> > It wouldn't be possible to make the GtkLabel flicker-free without
> > modifications to the core GTK+ drawing code for flicker free
> > drawing. (In the future, it will be possible create a global
> > option "draw everything flicker free").
> Wouldnt a widget with a window be able to achieve this? The user
> should be aware of the implications of using a GdkWindows for the
Yes a widget with a window can be made "flicker-free", but a
widget with window cannot have the current semantics of the
GtkLabel, which draws only the foreground, and not the
background. Essentially, you are talking about a GtkImageLabel.
(In analogy to XDrawImageString)
> In the future when the "draw everything flicker free" code is written
> we can make this option a no-op.
> btw, would you care to detail what are your plans for implementing
> this "flicker free drawing" engine? I am very interested in this.
The basic idea is very simple. When an expose event is handled on
a !NO_WINDOW widget, widget->window is temporarily replaced
with a pixmap, all the drawing code draws onto the pixmap, and
then the relevant area of the pixmap is copied back onto the screen.
(Just like the GnomeCanvas, essentially)
There are a number of niggly details that make this non-trivial
to implement - for instance, you need to be able to handle
gdk_window_clear_area()'s on a pixmap. (XClearArea only works
on a window), but it is certainly feasible.
] [Thread Prev