2002-08-12 Michael Meeks <michael@ximian.com>
[platform/core/uifw/at-spi2-atk.git] / test / test-simple.c
index 47699bb..802a3d0 100644 (file)
@@ -650,13 +650,6 @@ global_listener_cb (const AccessibleEvent *event,
 
        fprintf (stderr, "Fielded focus event ...\n");
 
-       /*
-        * must ref before doing "direct pointer" identity comparisons,
-        * e.g. "accessible == a".
-        * Alternatively, one can use cspi_object_equal (a, b)
-        */
-       Accessible_ref (event->source); 
-               
        if (!do_poke) {
                desktop = SPI_getDesktop (0);
                application = Accessible_getChildAtIndex (desktop, 0);
@@ -677,8 +670,6 @@ global_listener_cb (const AccessibleEvent *event,
 
        print_tree = TRUE;
        validate_accessible (event->source, TRUE, TRUE);
-       
-       Accessible_unref (event->source);
 }
 
 static SPIBoolean
@@ -689,8 +680,10 @@ key_listener_cb (const AccessibleKeystroke *stroke,
        
        *s = *stroke;
        
-       if (s->type == SPI_KEY_PRESSED) key_press_received = TRUE;
-       else if (s->type == SPI_KEY_RELEASED) key_release_received = TRUE;
+       if (s->type == SPI_KEY_PRESSED)
+               key_press_received = TRUE;
+       else if (s->type == SPI_KEY_RELEASED)
+               key_release_received = TRUE;
        
        return TRUE;
 }
@@ -699,6 +692,7 @@ key_listener_cb (const AccessibleKeystroke *stroke,
 static void
 test_keylisteners (void)
 {
+#ifdef BILL_MAKES_THIS_WORK_RELIABLY
        int i;
        AccessibleKeystroke stroke;
        AccessibleKeystrokeListener *key_listener;
@@ -742,6 +736,7 @@ test_keylisteners (void)
         g_assert (SPI_generateMouseEvent (-50, -50, "rel"));             
         g_assert (SPI_generateMouseEvent (-50, -50, "rel"));             
         g_assert (SPI_generateMouseEvent (-1, -1, "b1c")); 
+#endif
 }
 
 int