st: Move StWidget away from clutter_event_get_source()

Ask the stage about the device actor instead for hover tracking.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2216>
This commit is contained in:
Carlos Garnacho 2022-02-25 16:13:16 +01:00 committed by Marge Bot
parent 6064a3e020
commit a595fc6d47

View File

@ -692,7 +692,13 @@ st_widget_enter (ClutterActor *actor,
if (priv->track_hover) if (priv->track_hover)
{ {
if (clutter_actor_contains (actor, event->source)) ClutterStage *stage;
ClutterActor *target;
stage = clutter_event_get_stage ((ClutterEvent *) event);
target = clutter_stage_get_event_actor (stage, (ClutterEvent *) event);
if (clutter_actor_contains (actor, target))
st_widget_set_hover (ST_WIDGET (actor), TRUE); st_widget_set_hover (ST_WIDGET (actor), TRUE);
else else
{ {