Re: how to tell gtk to update only the GUI



Mehmet YASAR wrote:
Hi all,

I'm doing some lengthy calculations and I'd like to tell gtk to update only the GUI (gtk should process ONLY expose events).

Obviously, there is gtk_main_iteration() but that's processing all pending events (keypress, timers ...), that means I have to disable all keypress handler (timers ...) during the screen update.

So it would be simple if I had a way process only expose events (do you think I'm asking too much ?).

If your doing lengthly calculations... they should be split up into
short itterations, each itteration runs in a GSource... if you use a
timeout for this GSource, then you can play with your apps responsivness
by playing with the interval.

If you need your application to refuse button & key press events
(but still refresh itself graphicly), you should set the sensitivity
of your buttons during the lengthly operation (and just ignore key
press events).

Cheers,
                        -Tristan



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