diff --git a/clutter/clutter/clutter-main.c b/clutter/clutter/clutter-main.c index 1ce532012..c2d31b4dd 100644 --- a/clutter/clutter/clutter-main.c +++ b/clutter/clutter/clutter-main.c @@ -1642,6 +1642,26 @@ clutter_stage_update_device (ClutterStage *stage, } } +void +clutter_stage_repick_device (ClutterStage *stage, + ClutterInputDevice *device) +{ + graphene_point_t point; + ClutterActor *new_actor; + + clutter_stage_get_device_coords (stage, device, NULL, &point); + new_actor = + clutter_stage_get_actor_at_pos (stage, CLUTTER_PICK_REACTIVE, + point.x, point.y); + + clutter_stage_update_device (stage, + device, NULL, + point, + CLUTTER_CURRENT_TIME, + new_actor, + TRUE); +} + static ClutterActor * update_device_for_event (ClutterStage *stage, ClutterEvent *event, diff --git a/clutter/clutter/clutter-mutter.h b/clutter/clutter/clutter-mutter.h index 63b3fbf35..4e479c017 100644 --- a/clutter/clutter/clutter-mutter.h +++ b/clutter/clutter/clutter-mutter.h @@ -89,6 +89,9 @@ void clutter_stage_get_device_coords (ClutterStage *stage, ClutterInputDevice *device, ClutterEventSequence *sequence, graphene_point_t *coords); +CLUTTER_EXPORT +void clutter_stage_repick_device (ClutterStage *stage, + ClutterInputDevice *device); #undef __CLUTTER_H_INSIDE__