wayland: Avoid getting the ClutterStage through ClutterEvents

Fetch the ClutterStage through other means, as that field will go
away from events.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153>
This commit is contained in:
Carlos Garnacho
2023-08-02 20:10:52 +02:00
parent af9d406610
commit 77510ca72d
4 changed files with 40 additions and 4 deletions

View File

@ -650,7 +650,10 @@ repick_for_event (MetaWaylandPointer *pointer,
}
else
{
actor = clutter_stage_get_device_actor (clutter_event_get_stage (for_event),
MetaBackend *backend = backend_from_pointer (pointer);
ClutterStage *stage = CLUTTER_STAGE (meta_backend_get_stage (backend));
actor = clutter_stage_get_device_actor (stage,
clutter_event_get_device (for_event),
clutter_event_get_event_sequence (for_event));
}