[gtk+] Fix a startup ordering problem
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Fix a startup ordering problem
- Date: Tue, 25 Aug 2015 19:55:32 +0000 (UTC)
commit a5e2256770db712d2ca3f9866309cd3cd5f3d6c7
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Jan 8 23:16:39 2015 -0500
Fix a startup ordering problem
Defer a11y initialization until we have a display. A11y initialization
causes widget classes to be initalized, which in turn needs some
backend-specific information about modifier masks that can't be
obtained before we have a display.
https://bugzilla.gnome.org/show_bug.cgi?id=736125
gtk/gtkmain.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index dfb6d9b..0c3ed7a 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -689,6 +689,12 @@ gettext_initialization (void)
}
static void
+default_display_notify_cb (GdkDisplayManager *dm)
+{
+ _gtk_accessibility_init ();
+}
+
+static void
do_post_parse_initialization (int *argc,
char ***argv)
{
@@ -719,11 +725,8 @@ do_post_parse_initialization (int *argc,
_gtk_accel_map_init ();
- /* Set the 'initialized' flag.
- */
gtk_initialized = TRUE;
- /* load gtk modules */
if (gtk_modules_string)
{
_gtk_modules_init (argc, argv, gtk_modules_string->str);
@@ -734,7 +737,9 @@ do_post_parse_initialization (int *argc,
_gtk_modules_init (argc, argv, NULL);
}
- _gtk_accessibility_init ();
+ g_signal_connect (gdk_display_manager_get (), "notify::default-display",
+ G_CALLBACK (default_display_notify_cb),
+ NULL);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]