[gtk: 1/2] a11y: Realize GtkStackPage parent context before trying to get a ref
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk: 1/2] a11y: Realize GtkStackPage parent context before trying to get a ref
- Date: Wed, 25 May 2022 14:29:41 +0000 (UTC)
commit 6e3dbc42a8b9644350ff582efca97ed2ce8bb0dd
Author: Sebastian Keller <skeller gnome org>
Date: Wed May 25 14:56:05 2022 +0200
a11y: Realize GtkStackPage parent context before trying to get a ref
If a context is not realized, calling gtk_at_spi_context_to_ref() will
return a null ref, because its path has not been initialized yet. This
was already done for all other cases in get_parent_context_ref(), but
was missing for the GtkStackPage case.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4944
gtk/a11y/gtkatspicontext.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/gtk/a11y/gtkatspicontext.c b/gtk/a11y/gtkatspicontext.c
index 7c49929aff..a0086365c4 100644
--- a/gtk/a11y/gtkatspicontext.c
+++ b/gtk/a11y/gtkatspicontext.c
@@ -436,7 +436,11 @@ get_parent_context_ref (GtkAccessible *accessible)
gtk_accessible_get_at_context (GTK_ACCESSIBLE (parent));
if (parent_context != NULL)
- res = gtk_at_spi_context_to_ref (GTK_AT_SPI_CONTEXT (parent_context));
+ {
+ gtk_at_context_realize (parent_context);
+
+ res = gtk_at_spi_context_to_ref (GTK_AT_SPI_CONTEXT (parent_context));
+ }
}
if (res == NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]