clutter/actor: Add detail to ::event signal

Just like we did with the ::captured-event signal, add detail to the
::event signal too. At the first glance this might not seem necessary
since there are individual signals like scroll-event or touch-event that
get emitted at the same time, but these don't exist for touchpad gesture
events and others.

As an easy solution for that, just make it possible to use detail on the
event signal as we did with the caputured-event signal.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2431>
This commit is contained in:
Jonas Dreßler 2022-05-08 10:05:00 +02:00 committed by Marge Bot
parent 84396baafb
commit e5784bf885

View File

@ -7298,7 +7298,7 @@ clutter_actor_class_init (ClutterActorClass *klass)
actor_signals[EVENT] =
g_signal_new (I_("event"),
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED,
G_STRUCT_OFFSET (ClutterActorClass, event),
_clutter_boolean_handled_accumulator, NULL,
_clutter_marshal_BOOLEAN__BOXED,
@ -12131,7 +12131,7 @@ clutter_actor_event (ClutterActor *actor,
g_signal_emit (actor, actor_signals[CAPTURED_EVENT], detail, event, &retval);
else
{
g_signal_emit (actor, actor_signals[EVENT], 0, event, &retval);
g_signal_emit (actor, actor_signals[EVENT], detail, event, &retval);
if (!retval && signal_num != -1)
g_signal_emit (actor, actor_signals[signal_num], 0, event, &retval);