Re: frozen GUI!!! urgent help required!
- From: rsteinke w-link net
- To: pbd Op Net, RevX gmx at
- Cc: gtk-list gnome org, dreed capital edu
- Subject: Re: frozen GUI!!! urgent help required!
- Date: Tue, 12 Mar 2002 11:30:49 -0800
From: Paul Davis <pbd Op Net>
>
> yes, it is common to more or less all GUI toolkits, regardless of OS
> platform.
>
> >Isn't there a way to shortly stop calculations (for a necessary minimum
> >of time) and let the GUI gather possible events? Could this work
> >this way somehow? Any suggestions?
>
> somewhere inside your calculations, call this reasonably often:
>
> while (gtk_events_pending()) {
> gtk_main_iteration();
> }
>
> that will update the GUI while your calculations proceed.
Or, better, do:
while(g_main_iteration(FALSE)); /* No body */
which skips the gtk wrappers around the glib main loop.
In 2.0, you'll want to do:
while(g_main_context_iteration(NULL, FALSE)); /* No body */
since g_main_context_iteration() is deprecated in 2.0 (the API changed
a bit when they added support for multiple main loops).
Ron Steinke
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]