[gtk+/gtk-3-10] a11y: don't shutdown accessibility, so the atk bridge is always valid



commit 699e3e283465313773031ce572761b528cdf3774
Author: Mario Sanchez Prada <mario prada samsung com>
Date:   Mon Sep 16 16:57:49 2013 +0100

    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

 gtk/a11y/gtkaccessibility.c |   29 -----------------------------
 gtk/a11y/gtkaccessibility.h |    1 -
 gtk/gtkapplication.c        |    4 ----
 gtk/gtkmain.c               |    2 --
 4 files changed, 0 insertions(+), 36 deletions(-)
---
diff --git a/gtk/a11y/gtkaccessibility.c b/gtk/a11y/gtkaccessibility.c
index 407ffe7..3c51f26 100644
--- a/gtk/a11y/gtkaccessibility.c
+++ b/gtk/a11y/gtkaccessibility.c
@@ -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)
 {
diff --git a/gtk/a11y/gtkaccessibility.h b/gtk/a11y/gtkaccessibility.h
index 461e219..c3df055 100644
--- a/gtk/a11y/gtkaccessibility.h
+++ b/gtk/a11y/gtkaccessibility.h
@@ -23,7 +23,6 @@
 
 G_BEGIN_DECLS
 
-void      _gtk_accessibility_shutdown    (void);
 void      _gtk_accessibility_init        (void);
 
 gboolean  _gtk_accessibility_key_snooper (GtkWidget   *widget,
diff --git a/gtk/gtkapplication.c b/gtk/gtkapplication.c
index 0da7bfc..dfd6924 100644
--- a/gtk/gtkapplication.c
+++ b/gtk/gtkapplication.c
@@ -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);
 }
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index 285d181..eba38cc 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -1175,8 +1175,6 @@ gtk_main (void)
 
       /* Synchronize the recent manager singleton */
       _gtk_recent_manager_sync ();
-
-      _gtk_accessibility_shutdown ();
     }
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]