Re: Catching end of resize



On Mon, 2007-09-03 at 05:53 -0500, Mark Tilford wrote:
> My program has a complex layout procedure, so I only want to go
> through the full reformat when I have to (when the user releases the
> mouse at the end), and do a quick estimate while he/she's adjusting
> the size.

i've had similar needs, and the only approach i've found is using a
timeout. its not very satisfactory. i basically stick a one shot timeout
callback into the queue, typically to go off in 0.25 seconds. when it
runs, it checks if there was another "configure-event" since it was
queued. if so, it leaves itself in the timeout callback list. otherwise,
it executes the code needed at the completion of a resize operation.

the configure-event handler just checks to see if the timeout callback
has been installed. if so, it just increments a counter, otherwise it
installs the callback.

its a kludge, but i've not come up with a better way.

--p





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