hello,
i'm trying to clutter_actor_move_by a ClutterActor from a function that
gets called by an "event" from liblo (opensoundcontrol.org), but when
the function gets triggered from liblo (when triggered from main, it
moves and "refreshes" right away), it doesn't refresh the actor/window
until i move the mouse cursor over the clutter window, or hide/unhide
the window...
attached is an example code, and sorry for the liblo dependency, i don't
know how to simulate that...
i tried this with clutter 0.6 and 0.7 under debian/lenny(intel) and
ubuntu8.04(nvidia) so i could assume it's not a gfx card problem...
am i doing something very stupid in that code ?
or is it maybe a bug ?
(or does the code work under your system?)
probably i'm just missing some knowledge, i'm still learning C
.andre
#include <clutter/clutter.h>
#include <stdlib.h>
#include <lo/lo.h>
ClutterActor *rect1;
int move_actor()
{
printf("trying to move\n");
clutter_actor_move_by(rect1,20,20);
return 0;
}
int main(int argc, char *argv[])
{
lo_server_thread st = lo_server_thread_new("7771", NULL);
lo_server_thread_add_method(st, NULL, NULL, move_actor, NULL);
lo_server_thread_start(st);
ClutterColor stage_color = { 0x00, 0x00, 0x00, 0xff };
ClutterColor actor_color = { 0xff, 0xff, 0xff, 0x99 };
clutter_init (&argc, &argv);
/* Get the stage and set its size and color: */
ClutterActor *stage = clutter_stage_get_default ();
clutter_actor_set_size (stage, 200, 200);
clutter_stage_set_color (CLUTTER_STAGE (stage), &stage_color);
/* Add a rectangle to the stage: */
rect1 = clutter_rectangle_new_with_color (&actor_color);
clutter_actor_set_size (rect1, 50, 100);
clutter_actor_set_position (rect1, 20, 20);
clutter_container_add_actor (CLUTTER_CONTAINER (stage), rect1);
clutter_actor_show (rect1);
/* Show the stage: */
clutter_actor_show (stage);
move_actor();
/* Start the main loop, so we can respond to events: */
clutter_main ();
return EXIT_SUCCESS;
}