Re: Some questions on double buffering and expose in gtk2.



On Mon, 2002-10-28 at 02:12, Havoc Pennington wrote:
> 
> 
> Martin Sevior <msevior mccubbin ph unimelb edu au> writes: 
> > After drawing to a gtk-drawable, expose events are generated when part of
> > the drawable is unobscured. What should I do with these? For gtk 1.2 I
> > connected an expose event handler to a void callback and
> > just redrew the exposed rectangle. This doesn't seem to work consistently
> > in gtk2. I get regions of blank areas in drawables.
> > 
> > I guess it's because of the double buffering in gtk2.
> 
> Doubtful. Connecting to expose_event is still the right thing.
> 
> Maybe the "void callback" is the problem? I think expose_event
> callbacks are supposed to have a return value.
> 

Thanks Havoc,
	     My solution was to put the redraw into a gtk_idle function so the
redraw happens after gtk finishes doing whatever it is doing. 

Maybe the issue has something to do with drawing with xft enabled
FreeType.

Cheers

Martin


> If you were doing manual backing store with a pixmap, just blow all
> that code away to simplify things, it's no longer required.
> 
> There's a --gtk-debug=updates if you build your own GTK that may help.
> 
> > So what is the right way to handle expose events for gtk2? Is this
> > documented somewhere? Where?
> 
> GtkDrawingArea overview section in the ref docs may discuss this some,
> I don't remember.
> 
> Havoc
> _______________________________________________
> gnome-devel-list mailing list
> gnome-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gnome-devel-list





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