Q: How to optimize configure events?

I'm writing a program that uses a pixmap in conjuction with a drawing area
to speed redraws.  When the drawing area gets resized, I destroy the old
pixmap, create a new one of the new size, and then draw the background
(a semi-complex image) on it.  Future expose events then just copy the
necessary area from the pixmap to the drawing area.  My problem is this:
While the user is resizing the drawing area's window, multiple configure
events are generated, each one causing the semi-complex image to get
recreated at several "intermediate" sizes.  This causes jerky mouse
response while trying to resize the window.

My question is: Is there a way I can optimize the configure events so that
only the "final" one causes the the semi-complex image to be created?

 ____    Kressin   ____   .-----------------------------------. 
/___ \____________/ __ \  | dkressin@acm.org                  |
    \  \    /      /  \ | | Lead Programmer/Analyst           |
 ___/ __\/\/rench_ \__/ | | University of Wisconsin - Oshkosh |
\____/            \____/  | www.mio.uwosh.edu/~kressd11/      |

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