[gtk/a11y-debug] a11y: Realize notebook tabs when switching
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/a11y-debug] a11y: Realize notebook tabs when switching
- Date: Wed, 21 Apr 2021 00:36:24 +0000 (UTC)
commit 99750ac7ed27e490b0c143c083f9cb531ad5f111
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Apr 20 20:35:22 2021 -0400
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.
gtk/gtknotebook.c | 3 +++
1 file changed, 3 insertions(+)
---
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]