On Wed, 2008-05-14 at 15:03 -0300, Pedro Casagrande de Campos wrote:
> Hi Emmanuele,
>
>
> Thanks for the quick answer. The clutter idle handle worked as
> expected, but I still have a doubt regarding this. The problem is that
> the idle state is not executed when a timeline is running, what will
> happens most of the time on my application.
you should use:
clutter_threads_add_idle_full ()
and pass a higher priority than the priority of the timeline in Clutter,
like G_PRIORITY_DEFAULT + 30.
I've updated the test-threads.c in trunk and it doesn't have any problem
with the timeline that it runs (i.e., the idle handler gets executed
perfectly fine).
if you want, you can also use:
clutter_threads_add_timeout (10, handler, NULL)
instead of the idle - the timeout handlers are usually executed at a
higher priority than the idle handlers (which are executed only when the
main loop doesn't have anything to do).
> static void
> timeline_complete (ClutterTimeline *timeline)
> {
> g_usleep (100000);
> }
this will not do what you think it does. it will block the main loop,
preventing the idle for being fired until the timeline relinquishes
control to the main loop itself - that is, at the end of the time slice.
ciao,
Emmanuele.
--
Emmanuele Bassi, OpenedHand Ltd.
Unit R, Homesdale Business Centre
216-218 Homesdale Rd., Bromley - BR12QZ
http://www.o-hand.com
--
To unsubscribe send a mail to [EMAIL PROTECTED]