static gboolean registry_died = FALSE;
static gboolean atk_listeners_registered = FALSE;
static gint toplevels = 0;
+static gboolean exiting = FALSE;
static guint atk_signal_text_changed;
static guint atk_signal_children_changed;
if (g_getenv ("ATK_BRIDGE_REDIRECT_LOG"))
{
- fname = g_strconcat ("/tmp/", g_get_prgname (), ".at-spi-log");
- freopen (fname, "w", stderr);
+ fname = g_strconcat ("/tmp/", g_get_prgname (), ".at-spi-log", NULL);
+ /* make sure we're not being redirected - security issue */
+ if (!g_file_test (fname, G_FILE_TEST_IS_SYMLINK))
+ freopen (fname, "w", stderr);
g_free (fname);
}
if (registry_died || (registry == CORBA_OBJECT_NIL)) {
CORBA_exception_init (&ev);
if (registry_died)
- DBG (1, g_warning ("registry died! restarting..."));
-
+ {
+ if (exiting)
+ return CORBA_OBJECT_NIL;
+ else
+ DBG (1, g_warning ("registry died! restarting..."));
+ }
bonobo_activation_set_activation_env_value ("AT_SPI_DISPLAY", spi_display_name ());
registry = bonobo_activation_activate_from_id (
_exit (0);
}
+ exiting = TRUE;
/*
* Check whether we still have windows which have not been deleted.
*/
g_assert (bonobo_activate ());
}
- deregister_application (app);
+ if (!registry_died)
+ deregister_application (app);
DBG (1, g_message ("bridge exit func complete.\n"));
Accessibility_Event e;
SpiAccessible *source;
AtkObject *aobject;
+ Accessibility_Registry registry;
#ifdef SPI_BRIDGE_DEBUG
CORBA_string s;
#endif
CORBA_free (s);
#endif
CORBA_exception_init (&ev);
- Accessibility_Registry_notifyEvent (spi_atk_bridge_get_registry (),
+ registry = spi_atk_bridge_get_registry ();
+ if (registry_died) {
+ g_free (e.type);
+ return;
+ }
+ Accessibility_Registry_notifyEvent (registry,
&e, &ev);
#ifdef SPI_BRIDGE_DEBUG
if (ev._major != CORBA_NO_EXCEPTION)
CORBA_exception_id(&ev));
#endif
if (BONOBO_EX (&ev)) registry_died = TRUE;
- Accessibility_Accessible_unref (e.source, &ev);
+ bonobo_object_unref (BONOBO_OBJECT (source));
CORBA_exception_free (&ev);
CORBA_Object c_obj;
char *sp = NULL;
AtkObject *ao;
- AtkText *text;
gint detail1 = 0, detail2 = 0;
SpiAccessible *s_ao = NULL;
#ifdef SPI_BRIDGE_DEBUG
}
else if (signal_query.signal_id == atk_signal_text_selection_changed)
{
- text = ATK_TEXT (gobject);
-
/* Return NULL as the selected string */
spi_init_any_nil (&any);
}
if (sp)
g_free (sp);
+ if (any._release)
+ CORBA_free (any._value);
return TRUE;
}
if (atk_state_set_contains_state (stateset, ATK_STATE_ACTIVE))
{
spi_atk_emit_eventv (G_OBJECT (child), 0, 0, &any, "window:deactivate");
+ if (registry_died)
+ return;
}
g_object_unref (stateset);