summaryrefslogtreecommitdiff
path: root/gtk/a11y
diff options
context:
space:
mode:
authorLukáš Tyrychtr <lukastyrychtr@gmail.com>2023-03-10 16:36:39 +0000
committerMatthias Clasen <mclasen@redhat.com>2023-03-10 16:36:39 +0000
commitacf3f6bedac538e46c3f7757d7bcd47f68580cd1 (patch)
tree7ec98e62e72ed5a64d72cedfda321c269b25c199 /gtk/a11y
parent70fe37cf1b05600c9139012fdb0b0a8c5008ffd8 (diff)
downloadgtk+-acf3f6bedac538e46c3f7757d7bcd47f68580cd1.tar.gz
a11y: Notify assistive technologies when a GTK_ACCESSIBLE_PROPERTY_VALUE_NOW changes on a widget
This fixes silent sliders and similar controls when their value is changed.
Diffstat (limited to 'gtk/a11y')
-rw-r--r--gtk/a11y/gtkatspicontext.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/gtk/a11y/gtkatspicontext.c b/gtk/a11y/gtkatspicontext.c
index d7eede4429..e9339a7387 100644
--- a/gtk/a11y/gtkatspicontext.c
+++ b/gtk/a11y/gtkatspicontext.c
@@ -1096,11 +1096,19 @@ gtk_at_spi_context_state_change (GtkATContext *ctx,
}
if (changed_properties & GTK_ACCESSIBLE_PROPERTY_CHANGE_DESCRIPTION)
- {
- char *label = gtk_at_context_get_description (GTK_AT_CONTEXT (self));
- GVariant *v = g_variant_new_take_string (label);
+ {
+ char *label = gtk_at_context_get_description (GTK_AT_CONTEXT (self));
+ GVariant *v = g_variant_new_take_string (label);
emit_property_changed (self, "accessible-description", v);
}
+
+ if (changed_properties & GTK_ACCESSIBLE_PROPERTY_CHANGE_VALUE_NOW)
+ {
+ value = gtk_accessible_attribute_set_get_value (properties, GTK_ACCESSIBLE_PROPERTY_VALUE_NOW);
+ emit_property_changed (self,
+ "accessible-value",
+ g_variant_new_double (gtk_number_accessible_value_get (value)));
+ }
}
static void