events: Only deregister objects when they are defunct
authorBenjamin Otte <otte@redhat.com>
Mon, 19 Dec 2011 07:51:55 +0000 (08:51 +0100)
committerBenjamin Otte <otte@redhat.com>
Mon, 19 Dec 2011 19:07:28 +0000 (20:07 +0100)
We don't want to deregister them when they are changing from defunct to
functioning. And GTK 3.4 emits that change after setting up the
accessible.

atk-adaptor/event.c

index 61387b0..ef6b964 100644 (file)
@@ -650,7 +650,7 @@ state_event_listener (GSignalInvocationHint * signal_hint,
   emit_event (accessible, ITF_EVENT_OBJECT, STATE_CHANGED, pname, detail1, 0,
               DBUS_TYPE_INT32_AS_STRING, 0, append_basic);
 
   emit_event (accessible, ITF_EVENT_OBJECT, STATE_CHANGED, pname, detail1, 0,
               DBUS_TYPE_INT32_AS_STRING, 0, append_basic);
 
-  if (!g_strcmp0 (pname, "defunct"))
+  if (!g_strcmp0 (pname, "defunct") && detail1)
     spi_register_deregister_object (spi_global_register, G_OBJECT (accessible),
                                     TRUE);
   return TRUE;
     spi_register_deregister_object (spi_global_register, G_OBJECT (accessible),
                                     TRUE);
   return TRUE;