clutter: Simplify stage state management
Making this an event is overly convoluted, accounting that we emit the event, then convert it to a ClutterStage signal, then its only consumer (a11y) sets the active ATK state. Take the event out of the equation, unify activation/deactivation of the stage in MetaStage, and use it from the X11 backend too. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1623>
This commit is contained in:

committed by
Marge Bot

parent
96e320ba5a
commit
4a0c56f928
@ -104,15 +104,6 @@ get_event_state_string (const ClutterEvent *event)
|
||||
return g_strjoinv (",", (char **) mods);
|
||||
}
|
||||
|
||||
static void
|
||||
stage_state_cb (ClutterStage *stage,
|
||||
gpointer data)
|
||||
{
|
||||
gchar *detail = (gchar*)data;
|
||||
|
||||
printf("[stage signal] %s\n", detail);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
red_button_cb (ClutterActor *actor,
|
||||
ClutterEvent *event,
|
||||
@ -347,9 +338,6 @@ input_cb (ClutterActor *actor,
|
||||
state);
|
||||
}
|
||||
break;
|
||||
case CLUTTER_STAGE_STATE:
|
||||
g_print ("[%s] STAGE STATE", clutter_actor_get_name (source_actor));
|
||||
break;
|
||||
case CLUTTER_TOUCHPAD_PINCH:
|
||||
g_print ("[%s] TOUCHPAD PINCH", clutter_actor_get_name (source_actor));
|
||||
break;
|
||||
@ -401,10 +389,6 @@ test_events_main (int argc, char *argv[])
|
||||
clutter_actor_set_name (stage, "Stage");
|
||||
g_signal_connect (stage, "destroy", G_CALLBACK (clutter_test_quit), NULL);
|
||||
g_signal_connect (stage, "event", G_CALLBACK (input_cb), (char *) "stage");
|
||||
g_signal_connect (stage, "activate",
|
||||
G_CALLBACK (stage_state_cb), (char *) "activate");
|
||||
g_signal_connect (stage, "deactivate",
|
||||
G_CALLBACK (stage_state_cb), (char *) "deactivate");
|
||||
|
||||
focus_box = clutter_actor_new ();
|
||||
clutter_actor_set_background_color (focus_box, CLUTTER_COLOR_Black);
|
||||
|
@ -9,15 +9,6 @@ test_grab_main (int argc, char *argv[]);
|
||||
const char *
|
||||
test_grab_describe (void);
|
||||
|
||||
static void
|
||||
stage_state_cb (ClutterStage *stage,
|
||||
gpointer data)
|
||||
{
|
||||
gchar *detail = (gchar*)data;
|
||||
|
||||
printf("[stage signal] %s\n", detail);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
debug_event_cb (ClutterActor *actor,
|
||||
ClutterEvent *event,
|
||||
@ -59,9 +50,6 @@ debug_event_cb (ClutterActor *actor,
|
||||
case CLUTTER_SCROLL:
|
||||
printf("[%s] BUTTON SCROLL", source);
|
||||
break;
|
||||
case CLUTTER_STAGE_STATE:
|
||||
printf("[%s] STAGE STATE", source);
|
||||
break;
|
||||
case CLUTTER_TOUCH_BEGIN:
|
||||
g_print ("[%s] TOUCH BEGIN", source);
|
||||
break;
|
||||
@ -222,10 +210,6 @@ test_grab_main (int argc, char *argv[])
|
||||
g_signal_connect (stage, "destroy", G_CALLBACK (clutter_test_quit), NULL);
|
||||
g_signal_connect (stage, "event",
|
||||
G_CALLBACK (debug_event_cb), (char *) "stage");
|
||||
g_signal_connect (stage, "activate",
|
||||
G_CALLBACK (stage_state_cb), (char *) "activate");
|
||||
g_signal_connect (stage, "deactivate",
|
||||
G_CALLBACK (stage_state_cb), (char *) "deactivate");
|
||||
|
||||
actor = clutter_actor_new ();
|
||||
clutter_actor_set_background_color (actor, &rcol);
|
||||
|
Reference in New Issue
Block a user