mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 10:00:45 -05:00
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:
parent
94fb3f0c6a
commit
86c2e6e734
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user