1
0
Fork 0

2008-01-18 Emmanuele Bassi <ebassi@openedhand.com>

* tests/test-actors.c (input_cb): Fix the callback signature;
	hide the clicked actor only if it's a hand.
This commit is contained in:
Emmanuele Bassi 2008-01-18 18:11:33 +00:00
parent 94fb3f0c6a
commit 86c2e6e734
2 changed files with 18 additions and 6 deletions

View file

@ -1,3 +1,8 @@
2008-01-18 Emmanuele Bassi <ebassi@openedhand.com>
* tests/test-actors.c (input_cb): Fix the callback signature;
hide the clicked actor only if it's a hand.
2008-01-18 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-main.c (clutter_do_event): Check the

View file

@ -40,7 +40,7 @@ get_radius (void)
}
/* input handler */
void
static gboolean
input_cb (ClutterStage *stage,
ClutterEvent *event,
gpointer data)
@ -59,9 +59,11 @@ input_cb (ClutterStage *stage,
e = clutter_stage_get_actor_at_pos (stage, x, y);
if (e)
if (e && (CLUTTER_IS_TEXTURE (e) || CLUTTER_IS_CLONE_TEXTURE (e)))
{
clutter_actor_hide (e);
return TRUE;
}
}
else if (event->type == CLUTTER_KEY_RELEASE)
{
@ -71,13 +73,18 @@ input_cb (ClutterStage *stage,
clutter_key_event_symbol (kev));
if (clutter_key_event_symbol (kev) == CLUTTER_q)
{
clutter_main_quit ();
return TRUE;
}
}
return FALSE;
}
/* Timeline handler */
void
static void
frame_cb (ClutterTimeline *timeline,
gint frame_num,
gpointer data)