[java-atk-wrapper] Force Java app to quit before the invocation of exit func registered by ATK bridge



commit a16cb15c5dbc269dd026c27e1199ceff1db7454d
Author: Ke Wang <ke wang sun com>
Date:   Wed Aug 19 17:29:47 2009 +0800

    Force Java app to quit before the invocation of exit func registered by ATK bridge

 jni/src/AtkWrapper.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/jni/src/AtkWrapper.c b/jni/src/AtkWrapper.c
index 88aa70c..810c0d3 100644
--- a/jni/src/AtkWrapper.c
+++ b/jni/src/AtkWrapper.c
@@ -86,6 +86,11 @@ jaw_idle_dispatch (GSource    *source,
 	return origin_g_idle_dispatch(source, callback, user_data);
 }
 
+static void jaw_exit_func ()
+{
+	_exit(0);
+}
+
 static gboolean
 jaw_load_atk_bridge (gpointer p)
 {
@@ -100,15 +105,13 @@ jaw_load_atk_bridge (gpointer p)
 	}
 
 	GVoidFunc dl_init;
-	GVoidFunc dl_shutdown;
-	if (!g_module_symbol( module, "gnome_accessibility_module_init", (gpointer*)&dl_init)
-			|| !g_module_symbol( module, "gnome_accessibility_module_shutdown", (gpointer*)&dl_shutdown)) {
+	if (!g_module_symbol( module, "gnome_accessibility_module_init", (gpointer*)&dl_init)) {
 		g_module_close(module);
 		return NULL;
 	}
 
 	(dl_init)();
-	g_atexit( dl_shutdown );
+	g_atexit( jaw_exit_func );
 
 	return FALSE;
 }



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