Pregunta

Hi i have two clutter_actors . when i shift the focus from actor_1 to actor_2 for the first time it works. but later it does not shift back. I use the following statements.

clutter_stage_set_key_focus (CLUTTER_STAGE(stage), actor_2);
g_signal_connect (actor_1, "key-press-event", G_CALLBACK (button_key_press), NULL);
clutter_actor_set_reactive (actor_2, TRUE);

Am I missing anything ?

¿Fue útil?

Solución

I solved it.

It was very easy. Its the same code i have used which i have given in the question.

Actually i was giving the key focus to actor_2 when i wanted to shift the focus from actor_2 to actor_1 . It was a logical error from my side.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top