[gtkada] Double expose event

Emmanuel Briot briot at ACT-Europe.FR
Mon Jan 14 15:44:04 CET 2002


<manuel.op.de.coul at eon-benelux.com> writes:

> I hope somebody has dealt with this before:
> I have some dialogs with a GtkDrawingArea that has
> a callback handler for expose_event. This works
> fine when a window in front of it is removed, then
> the drawing area gets redrawn by the callback.
> However when the window containing the drawing area
> is resized, resizing the drawing area with it,
> there are two expose_events and consequently two
> redraws. Happens both on Unix and Windows.
> How to prevent this? I'm not looking for double buffering.

Are you taking into account the area set in the event ? It is normal to get
several expose event, but probably the areas in them do not overlap. You should
thus only draw (for efficiency) in that area, the rest of the widget doesn't
need to be redrawn.

Emmanuel




More information about the gtkada mailing list