[gtk/ebassi/for-master: 1/11] Handle empty stack pages when creating an ATContext
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/ebassi/for-master: 1/11] Handle empty stack pages when creating an ATContext
- Date: Thu, 12 Nov 2020 16:49:42 +0000 (UTC)
commit 5d29cb780e0492eb072ffa20fad35643fd8d7419
Author: Emmanuele Bassi <ebassi gnome org>
Date: Thu Nov 12 16:48:03 2020 +0000
Handle empty stack pages when creating an ATContext
If we don't have a widget inside GtkStackPage, we should use the default
GdkDisplay.
gtk/gtkstack.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkstack.c b/gtk/gtkstack.c
index 7e92686c1c..bd4673bc62 100644
--- a/gtk/gtkstack.c
+++ b/gtk/gtkstack.c
@@ -228,7 +228,12 @@ gtk_stack_page_accessible_get_at_context (GtkAccessible *accessible)
if (page->at_context == NULL)
{
GtkAccessibleRole role = GTK_ACCESSIBLE_ROLE_TAB_PANEL;
- GdkDisplay *display = gtk_widget_get_display (page->widget);
+ GdkDisplay *display;
+
+ if (page->widget != NULL)
+ display = gtk_widget_get_display (page->widget);
+ else
+ display = gdk_display_get_default ();
page->at_context = gtk_at_context_create (role, accessible, display);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]