From 8ec1045c87588007095c521027f0051f76481180 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 1 May 2024 07:55:47 -0400 Subject: [PATCH 1/2] a11y: Stop emitting Focus events These have been deprecated for a long time, and we have been asked to stop emitting them. Related: #454 --- gtk/a11y/gtkatspicontext.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/gtk/a11y/gtkatspicontext.c b/gtk/a11y/gtkatspicontext.c index b6557148b4..dc3105fa38 100644 --- a/gtk/a11y/gtkatspicontext.c +++ b/gtk/a11y/gtkatspicontext.c @@ -899,24 +899,6 @@ emit_children_changed (GtkAtSpiContext *self, context_ref); } -static void -emit_focus (GtkAtSpiContext *self, - gboolean focus_in) -{ - if (self->connection == NULL) - return; - - if (focus_in) - g_dbus_connection_emit_signal (self->connection, - NULL, - self->context_path, - "org.a11y.atspi.Event.Focus", - "Focus", - g_variant_new ("(siiva{sv})", - "", 0, 0, g_variant_new_string ("0"), NULL), - NULL); -} - static void emit_window_event (GtkAtSpiContext *self, const char *event_type) @@ -1196,7 +1178,6 @@ gtk_at_spi_context_platform_change (GtkATContext *ctx, gboolean state = gtk_accessible_get_platform_state (GTK_ACCESSIBLE (widget), GTK_ACCESSIBLE_PLATFORM_STATE_FOCUSED); emit_state_changed (self, "focused", state); - emit_focus (self, state); } if (changed_platform & GTK_ACCESSIBLE_PLATFORM_CHANGE_ACTIVE) From 152dd70cded8e535231e2efed037d0fb98c300bf Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 1 May 2024 07:57:19 -0400 Subject: [PATCH 2/2] a11y: Drop the Focus event from the interface too We don't use it anymore. --- gtk/a11y/atspi/Event.xml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/gtk/a11y/atspi/Event.xml b/gtk/a11y/atspi/Event.xml index 361435883e..caa0118959 100644 --- a/gtk/a11y/atspi/Event.xml +++ b/gtk/a11y/atspi/Event.xml @@ -184,10 +184,4 @@ - - - - - -