[at-spi2-core] Invalidate states when receiving a focus event



commit cdabc42a524d36456bf517cd0c3395aeb0ec2b84
Author: Mike Gorse <mgorse novell com>
Date:   Tue Feb 21 10:58:02 2012 -0600

    Invalidate states when receiving a focus event
    
    Sometimes we get "focus" events from gtk, but the cache still does not
    indicate that the object has STATE_FOCUSED. Really should get to the
    bottom of this but don't have time to investigate more right now. Might
    be some kind of issue with the accessible being added to the cache
    before it is fully initialized--perhaps AddAccessible really doesn't
    make sense.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=663992

 atspi/atspi-event-listener.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/atspi/atspi-event-listener.c b/atspi/atspi-event-listener.c
index 4581f82..753e094 100644
--- a/atspi/atspi-event-listener.c
+++ b/atspi/atspi-event-listener.c
@@ -935,6 +935,11 @@ _atspi_dbus_handle_event (DBusConnection *bus, DBusMessage *message, void *data)
   {
     cache_process_state_changed (&e);
   }
+  else if (!strncmp (e.type, "focus", 5))
+  {
+    /* BGO#663992 - TODO: figure out the real problem */
+    e.source->cached_properties &= ~(ATSPI_CACHE_STATES);
+  }
 
   _atspi_send_event (&e);
 



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