clutter: Drop clutter-wide clutter_stage_repick_device()

This is only called from a single place inside ClutterStage code,
drop this public internal function, and repick in place.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3696>
This commit is contained in:
Carlos Garnacho 2024-04-10 17:30:07 +02:00 committed by Marge Bot
parent bbb196bdde
commit 22d0ff569a
2 changed files with 15 additions and 22 deletions

View File

@ -106,9 +106,6 @@ gboolean clutter_stage_get_device_coords (ClutterStage *stage,
ClutterInputDevice *device, ClutterInputDevice *device,
ClutterEventSequence *sequence, ClutterEventSequence *sequence,
graphene_point_t *coords); graphene_point_t *coords);
CLUTTER_EXPORT
void clutter_stage_repick_device (ClutterStage *stage,
ClutterInputDevice *device);
CLUTTER_EXPORT CLUTTER_EXPORT
void clutter_get_debug_flags (ClutterDebugFlag *debug_flags, void clutter_get_debug_flags (ClutterDebugFlag *debug_flags,

View File

@ -1623,7 +1623,21 @@ static void
on_seat_unfocus_inhibited_changed (ClutterStage *stage, on_seat_unfocus_inhibited_changed (ClutterStage *stage,
ClutterSeat *seat) ClutterSeat *seat)
{ {
clutter_stage_repick_device (stage, clutter_seat_get_pointer (seat)); ClutterInputDevice *device;
graphene_point_t point = GRAPHENE_POINT_INIT_ZERO;
device = clutter_seat_get_pointer (seat);
if (!clutter_stage_get_device_coords (stage, device, NULL, &point))
return;
clutter_stage_pick_and_update_device (stage,
device,
NULL, NULL,
CLUTTER_DEVICE_UPDATE_IGNORE_CACHE |
CLUTTER_DEVICE_UPDATE_EMIT_CROSSING,
point,
CLUTTER_CURRENT_TIME);
} }
static void static void
@ -3524,24 +3538,6 @@ clutter_stage_update_device (ClutterStage *stage,
} }
} }
void
clutter_stage_repick_device (ClutterStage *stage,
ClutterInputDevice *device)
{
graphene_point_t point = GRAPHENE_POINT_INIT_ZERO;
if (!clutter_stage_get_device_coords (stage, device, NULL, &point))
return;
clutter_stage_pick_and_update_device (stage,
device,
NULL, NULL,
CLUTTER_DEVICE_UPDATE_IGNORE_CACHE |
CLUTTER_DEVICE_UPDATE_EMIT_CROSSING,
point,
CLUTTER_CURRENT_TIME);
}
static gboolean static gboolean
clutter_stage_check_in_clear_area (ClutterStage *stage, clutter_stage_check_in_clear_area (ClutterStage *stage,
ClutterInputDevice *device, ClutterInputDevice *device,