RE: 'synchronous redraw' with a DrawingArea



Maybe you can turn off the doublebuffer, there is a function to do this:
void        gtk_widget_set_double_buffered  (GtkWidget *widget,
                                             gboolean double_buffered);

> -----Original Message-----
> From: gtk-list-admin gnome org [mailto:gtk-list-admin gnome org] On
Behalf
> Of Soeren Sandmann
> Sent: Saturday, April 17, 2004 7:51 AM
> To: Pascal Ognibene
> Cc: Sven Neumann; gtk-list gnome org
> Subject: Re: 'synchronous redraw' with a DrawingArea
> 
> Pascal Ognibene <pascal ognibene libertysurf fr> writes:
> 
> > 1) I'm not sure it would work if X11 or GTK try to merge the expose
> events
> > for optimization. This mostly depends on the timing I guess
> 
> You should just call gtk_widget_queue_draw() or
> gtk_widget_queeu_draw_area(). That will make gtk+ to eventually call
> the expose handler of that widget.
> 
> Gtk+ does merge expose events together, but it will keep track of the
> entire area that needs to be redrawn, so things will work regardless
> of timing.
> 
> > 2) if it works there would be one useless redraw...
> 
> In this particular case gtk+ will be able to ignore the expose event
> sent by the X server:
> 
>         - if the expose event arrives *before* gtk+ gets around to
>           calling the expose handler of your widget, it will just be
>           merged in with the redraw you already scheduled.
> 
>         - if the expose event arrives *after* gtk+ called your expose
>           handler, gtk+ checks if the X server knew about the painting
>           when it generated the expose events. If it didn't, the
>           expose event can just be thrown away.
> 
> 
> Søren
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list




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