clutter: Do not export _clutter_stage_do_pick()

The clutter_stage_get_actor_at_pos() calls it almost 1:1 underneath
and is public API, we can have all callers use this, and stop using
this function outside of clutter-stage.c.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1915>
This commit is contained in:
Carlos Garnacho 2021-06-25 18:47:24 +02:00 committed by Marge Bot
parent 49045b2ab9
commit 6aea319c5c
3 changed files with 7 additions and 7 deletions

View File

@ -776,7 +776,8 @@ update_device_for_event (ClutterStage *stage,
time_ms = clutter_event_get_time (event); time_ms = clutter_event_get_time (event);
new_actor = new_actor =
_clutter_stage_do_pick (stage, point.x, point.y, CLUTTER_PICK_REACTIVE); clutter_stage_get_actor_at_pos (stage, CLUTTER_PICK_REACTIVE,
point.x, point.y);
/* Picking should never fail, but if it does, we bail out here */ /* Picking should never fail, but if it does, we bail out here */
g_return_val_if_fail (new_actor != NULL, NULL); g_return_val_if_fail (new_actor != NULL, NULL);

View File

@ -81,11 +81,6 @@ void _clutter_stage_process_queued_events (ClutterStage *stage);
void _clutter_stage_update_input_devices (ClutterStage *stage); void _clutter_stage_update_input_devices (ClutterStage *stage);
gboolean _clutter_stage_has_full_redraw_queued (ClutterStage *stage); gboolean _clutter_stage_has_full_redraw_queued (ClutterStage *stage);
ClutterActor *_clutter_stage_do_pick (ClutterStage *stage,
float x,
float y,
ClutterPickMode mode);
ClutterPaintVolume *_clutter_stage_paint_volume_stack_allocate (ClutterStage *stage); ClutterPaintVolume *_clutter_stage_paint_volume_stack_allocate (ClutterStage *stage);
void _clutter_stage_paint_volume_stack_free_all (ClutterStage *stage); void _clutter_stage_paint_volume_stack_free_all (ClutterStage *stage);

View File

@ -170,6 +170,10 @@ static void clutter_stage_update_view_perspective (ClutterStage *stage);
static void clutter_stage_set_viewport (ClutterStage *stage, static void clutter_stage_set_viewport (ClutterStage *stage,
float width, float width,
float height); float height);
static ClutterActor * _clutter_stage_do_pick (ClutterStage *stage,
float x,
float y,
ClutterPickMode mode);
G_DEFINE_TYPE_WITH_PRIVATE (ClutterStage, clutter_stage, CLUTTER_TYPE_ACTOR) G_DEFINE_TYPE_WITH_PRIVATE (ClutterStage, clutter_stage, CLUTTER_TYPE_ACTOR)
@ -1052,7 +1056,7 @@ clutter_stage_get_view_at (ClutterStage *stage,
return NULL; return NULL;
} }
ClutterActor * static ClutterActor *
_clutter_stage_do_pick (ClutterStage *stage, _clutter_stage_do_pick (ClutterStage *stage,
float x, float x,
float y, float y,