From e648ef798041fde3448e886141d4b7492f8f819c Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Tue, 1 Aug 2023 02:23:17 +0300 Subject: [PATCH] clutter: Pass stage to emit_event() Avoid poking at the event field, and use an explicit parameter. Part-of: --- clutter/clutter/clutter-main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/clutter/clutter/clutter-main.c b/clutter/clutter/clutter-main.c index db41979db..b9871b7cf 100644 --- a/clutter/clutter/clutter-main.c +++ b/clutter/clutter/clutter-main.c @@ -682,13 +682,14 @@ _clutter_boolean_continue_accumulator (GSignalInvocationHint *ihint, */ static inline void -emit_event (ClutterEvent *event) +emit_event (ClutterStage *stage, + ClutterEvent *event) { if (event->type == CLUTTER_KEY_PRESS || event->type == CLUTTER_KEY_RELEASE) cally_snoop_key_event ((ClutterKeyEvent *) event); - clutter_stage_emit_event (event->any.stage, event); + clutter_stage_emit_event (stage, event); } static ClutterActor * @@ -876,7 +877,7 @@ _clutter_process_event_details (ClutterActor *stage, case CLUTTER_TOUCH_END: case CLUTTER_PROXIMITY_IN: case CLUTTER_PROXIMITY_OUT: - emit_event (event); + emit_event (CLUTTER_STAGE (stage), event); break; case CLUTTER_DEVICE_REMOVED: