mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 00:20:42 -05:00
clutter: Change _clutter_process_event name/signature
Avoid using the ClutterEvent stage field, and pass the stage explicitly. Also rename to clutter_stage_process_event(), so that its ownership/namespace is clearer. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153>
This commit is contained in:
parent
2e3d55c948
commit
b52aa487c8
@ -10,7 +10,8 @@ void _clutter_event_set_pointer_emulated (ClutterEvent *eve
|
||||
|
||||
/* Reinjecting queued events for processing */
|
||||
CLUTTER_EXPORT
|
||||
void _clutter_process_event (ClutterEvent *event);
|
||||
void clutter_stage_process_event (ClutterStage *stage,
|
||||
ClutterEvent *event);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
gboolean _clutter_event_process_filters (ClutterEvent *event,
|
||||
|
@ -887,29 +887,22 @@ _clutter_process_event_details (ClutterActor *stage,
|
||||
}
|
||||
|
||||
/*
|
||||
* _clutter_process_event
|
||||
* clutter_stage_process_event
|
||||
* @event: a #ClutterEvent.
|
||||
*
|
||||
* Does the actual work of processing an event that was queued earlier
|
||||
* out of clutter_stage_handle_event().
|
||||
*/
|
||||
void
|
||||
_clutter_process_event (ClutterEvent *event)
|
||||
clutter_stage_process_event (ClutterStage *stage,
|
||||
ClutterEvent *event)
|
||||
{
|
||||
ClutterMainContext *context;
|
||||
ClutterActor *stage;
|
||||
ClutterSeat *seat;
|
||||
|
||||
context = _clutter_context_get_default ();
|
||||
seat = clutter_backend_get_default_seat (context->backend);
|
||||
|
||||
stage = CLUTTER_ACTOR (event->any.stage);
|
||||
if (stage == NULL)
|
||||
{
|
||||
CLUTTER_NOTE (EVENT, "Discarding event without a stage set");
|
||||
return;
|
||||
}
|
||||
|
||||
/* push events on a stack, so that we don't need to
|
||||
* add an event parameter to all signals that can be emitted within
|
||||
* an event chain
|
||||
@ -917,7 +910,7 @@ _clutter_process_event (ClutterEvent *event)
|
||||
context->current_event = g_slist_prepend (context->current_event, event);
|
||||
|
||||
clutter_seat_handle_event_post (seat, event);
|
||||
_clutter_process_event_details (stage, context, event);
|
||||
_clutter_process_event_details (CLUTTER_ACTOR (stage), context, event);
|
||||
|
||||
context->current_event = g_slist_delete_link (context->current_event, context->current_event);
|
||||
}
|
||||
|
@ -769,7 +769,7 @@ _clutter_stage_process_queued_events (ClutterStage *stage)
|
||||
}
|
||||
}
|
||||
|
||||
_clutter_process_event (event);
|
||||
clutter_stage_process_event (stage, event);
|
||||
|
||||
next_event:
|
||||
clutter_event_free (event);
|
||||
|
Loading…
Reference in New Issue
Block a user