Re: Window configure events "consolidation"

James K. Wiggs wrote:


   I'm trying to figure a way to get window resize events "consolidated."
By this, I mean I'd like to figure a way to get the new size of the window
only *after* the user is completely done with the resizing process and has
released the mouse button.  The contents of the window are quite complex
and redrawing takes a while, so I would rather *not* do it for every one
of the configure events generated.  Can anyone suggest a way to do this?

This functionality is normally handled by your window manager - most modern wm's give the user the ability to select various flavors of "opaque" or "rubber band" resizing styles, which basically control when and how many resize events are sent to your app. Trying to enforce specific behaviour in your app may be unpopular with your users; that said, if it's really necessary, just set a flag when receiving resize events (and postpone your drawing) - then create an idle callback that tests the flag and performs drawing as needed.

Timothy M. Shead
tshead k-3d com

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