summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-10-24 23:12:36 -0400
committerMatthias Clasen <mclasen@redhat.com>2020-10-24 23:12:36 -0400
commitadb7676fc1464fe34a2e25806e3b7b26a9de62eb (patch)
tree2bbf923d352d306158edb1543159719e12885826
parent8ffb39851746f364594d4bd52a2869886435fef3 (diff)
downloadgtk+-matthiasc/atspi-child.tar.gz
a11y: More State<>Change confusionmatthiasc/atspi-child
We should really avoid this needless duplication - the 'state' is never stored anywhere.
-rw-r--r--gtk/a11y/gtkatspiroot.c15
-rw-r--r--gtk/a11y/gtkatspirootprivate.h2
2 files changed, 15 insertions, 2 deletions
diff --git a/gtk/a11y/gtkatspiroot.c b/gtk/a11y/gtkatspiroot.c
index 9aec9af186..c4c09bdae1 100644
--- a/gtk/a11y/gtkatspiroot.c
+++ b/gtk/a11y/gtkatspiroot.c
@@ -407,12 +407,13 @@ static const GDBusInterfaceVTable root_accessible_vtable = {
void
gtk_at_spi_root_child_changed (GtkAtSpiRoot *self,
- GtkAccessibleChildState state,
+ GtkAccessibleChildChange change,
GtkAccessible *child)
{
guint n, i;
int idx = 0;
GVariant *window_ref;
+ GtkAccessibleChildState state;
if (!self->toplevels)
return;
@@ -443,6 +444,18 @@ gtk_at_spi_root_child_changed (GtkAtSpiRoot *self,
window_ref = gtk_at_spi_context_to_ref (GTK_AT_SPI_CONTEXT (context));
}
+ switch (change)
+ {
+ case GTK_ACCESSIBLE_CHILD_CHANGE_ADDED:
+ state = GTK_ACCESSIBLE_CHILD_STATE_ADDED;
+ break;
+ case GTK_ACCESSIBLE_CHILD_CHANGE_REMOVED:
+ state = GTK_ACCESSIBLE_CHILD_STATE_REMOVED;
+ break;
+ default:
+ g_assert_not_reached ();
+ }
+
gtk_at_spi_emit_children_changed (self->connection,
self->root_path,
state,
diff --git a/gtk/a11y/gtkatspirootprivate.h b/gtk/a11y/gtkatspirootprivate.h
index c4046c35e5..f5ae272999 100644
--- a/gtk/a11y/gtkatspirootprivate.h
+++ b/gtk/a11y/gtkatspirootprivate.h
@@ -44,7 +44,7 @@ gtk_at_spi_root_to_ref (GtkAtSpiRoot *self);
void
gtk_at_spi_root_child_changed (GtkAtSpiRoot *self,
- GtkAccessibleChildState state,
+ GtkAccessibleChildChange change,
GtkAccessible *child);
G_END_DECLS