mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-18 08:20:05 +00:00
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
This commit is contained in:
parent
6f9fed45ef
commit
8d83d989bb
@ -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 ();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user