Commit 8d83d989 authored by Mario Sanchez Prada's avatar Mario Sanchez Prada Committed by Matthias Clasen

a11y: don't shutdown accessibility, so the atk bridge is always valid

This will fix issues in applications that for some reason make
several and not nested calls to gtk_main() during their lifetime,
effectively initializing a11y when the first, top most, main loop
is being run and shutting it down then that loop is quit.

https://bugzilla.gnome.org/show_bug.cgi?id=708024

https://bugzilla.gnome.org/show_bug.cgi?id=684076
parent 6f9fed45
......@@ -967,35 +967,6 @@ do_window_event_initialization (void)
g_signal_connect (root, "children-changed::remove", (GCallback) window_removed, NULL);
}
static void
undo_window_event_initialization (void)
{
AtkObject *root;
root = atk_get_root ();
g_signal_handlers_disconnect_by_func (root, (GCallback) window_added, NULL);
g_signal_handlers_disconnect_by_func (root, (GCallback) window_removed, NULL);
}
void
_gtk_accessibility_shutdown (void)
{
if (!initialized)
return;
initialized = FALSE;
g_clear_object (&atk_misc_instance);
#ifdef GDK_WINDOWING_X11
atk_bridge_adaptor_cleanup ();
#endif
undo_window_event_initialization ();
}
void
_gtk_accessibility_init (void)
{
......
......@@ -23,7 +23,6 @@
G_BEGIN_DECLS
void _gtk_accessibility_shutdown (void);
void _gtk_accessibility_init (void);
gboolean _gtk_accessibility_key_snooper (GtkWidget *widget,
......
......@@ -47,8 +47,6 @@
#include <gdk/x11/gdkx.h>
#endif
extern void _gtk_accessibility_shutdown (void);
/**
* SECTION:gtkapplication
* @title: GtkApplication
......@@ -433,8 +431,6 @@ gtk_application_shutdown (GApplication *application)
/* Synchronize the recent manager singleton */
_gtk_recent_manager_sync ();
_gtk_accessibility_shutdown ();
G_APPLICATION_CLASS (gtk_application_parent_class)
->shutdown (application);
}
......
......@@ -1175,8 +1175,6 @@ gtk_main (void)
/* Synchronize the recent manager singleton */
_gtk_recent_manager_sync ();
_gtk_accessibility_shutdown ();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment