summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-04-20 20:35:22 -0400
committerMatthias Clasen <mclasen@redhat.com>2021-04-20 20:35:22 -0400
commit99750ac7ed27e490b0c143c083f9cb531ad5f111 (patch)
tree403bbf7a7e1d5baa2d51507774f2b0fdf967c75f
parentb97d0a394072cc71f031b80364d659dbf600e8d9 (diff)
downloadgtk+-99750ac7ed27e490b0c143c083f9cb531ad5f111.tar.gz
a11y: Realize notebook tabs when switching
We're not moving focus here, so we can't rely on that to conjure the a11y objects into existence.
-rw-r--r--gtk/gtknotebook.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 380cd51e5e..aa89cf6067 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -5461,6 +5461,9 @@ gtk_notebook_real_switch_page (GtkNotebook *notebook,
gtk_widget_set_state_flags (page->tab_widget, GTK_STATE_FLAG_CHECKED, FALSE);
gtk_widget_set_visible (notebook->header_widget, notebook->show_tabs);
+ if (gtk_widget_get_realized (GTK_WIDGET (notebook)))
+ gtk_widget_realize_at_context (notebook->cur_page->tab_widget);
+
gtk_accessible_update_state (GTK_ACCESSIBLE (notebook->cur_page->tab_widget),
GTK_ACCESSIBLE_STATE_SELECTED, TRUE,
-1);