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
This commit is contained in:
Matthias Clasen 2015-01-08 23:16:39 -05:00
parent c55ff6e41f
commit a5e2256770

View File

@ -688,6 +688,12 @@ gettext_initialization (void)
#endif
}
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);
}