mirror of
https://github.com/brl/mutter.git
synced 2025-04-09 03:39:39 +00:00
tests: Avoid getting the stage through ClutterEvents
Obtain the stage through other means, as this information will eventually move away from events. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153>
This commit is contained in:
parent
36fda95217
commit
af9d406610
@ -120,7 +120,10 @@ test_action_handle_event (ClutterAction *action,
|
|||||||
|
|
||||||
if (action_claim_sequence)
|
if (action_claim_sequence)
|
||||||
{
|
{
|
||||||
clutter_stage_notify_action_implicit_grab (clutter_event_get_stage (event),
|
ClutterActor *actor;
|
||||||
|
|
||||||
|
actor = clutter_actor_meta_get_actor (CLUTTER_ACTOR_META (action));
|
||||||
|
clutter_stage_notify_action_implicit_grab (CLUTTER_STAGE (clutter_actor_get_stage (actor)),
|
||||||
clutter_event_get_device (event),
|
clutter_event_get_device (event),
|
||||||
clutter_event_get_event_sequence (event));
|
clutter_event_get_event_sequence (event));
|
||||||
}
|
}
|
||||||
|
@ -94,7 +94,7 @@ debug_event_cb (ClutterActor *actor,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
target = clutter_stage_get_device_actor (clutter_event_get_stage (event),
|
target = clutter_stage_get_device_actor (CLUTTER_STAGE (clutter_actor_get_stage (actor)),
|
||||||
clutter_event_get_device (event),
|
clutter_event_get_device (event),
|
||||||
clutter_event_get_event_sequence (event));
|
clutter_event_get_event_sequence (event));
|
||||||
if (target == actor)
|
if (target == actor)
|
||||||
@ -149,7 +149,7 @@ toggle_grab_pointer_cb (ClutterActor *actor,
|
|||||||
ClutterActor *target;
|
ClutterActor *target;
|
||||||
|
|
||||||
/* we only deal with the event if the source is ourself */
|
/* we only deal with the event if the source is ourself */
|
||||||
target = clutter_stage_get_device_actor (clutter_event_get_stage (event),
|
target = clutter_stage_get_device_actor (CLUTTER_STAGE (clutter_actor_get_stage (actor)),
|
||||||
clutter_event_get_device (event),
|
clutter_event_get_device (event),
|
||||||
clutter_event_get_event_sequence (event));
|
clutter_event_get_event_sequence (event));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user