diff options
author | Mike Gorse <mgorse@novell.com> | 2011-11-14 17:14:21 -0600 |
---|---|---|
committer | Mike Gorse <mgorse@novell.com> | 2011-11-14 17:14:21 -0600 |
commit | a0af0bcb79087fc16328cfe69a6845040d504bd1 (patch) | |
tree | 8c247651ddfc1d410dde5866d0ffe0f62846a354 | |
parent | 166209e13b1eae0b6b239c868ae532702032831f (diff) | |
download | at-spi2-core-a0af0bcb79087fc16328cfe69a6845040d504bd1.tar.gz |
Fix for BGO#663992: set STATE_FOCUSED for a "focus" event
Sometimes gtk does not initially emit a state-change event when an
accessible initially gains focus, so assume that, if it sends a "focus"
event, then it is gaining STATE_FOCUSED.
AT-SPI doesn't seem like the right place for this kind of check, but,
for the sake of getting something working in time for the release, I'm
committing the change but only in gnome-3-2.
-rw-r--r-- | atspi/atspi-event-listener.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/atspi/atspi-event-listener.c b/atspi/atspi-event-listener.c index e02a12d7..c07fa198 100644 --- a/atspi/atspi-event-listener.c +++ b/atspi/atspi-event-listener.c @@ -897,6 +897,9 @@ _atspi_dbus_handle_event (DBusConnection *bus, DBusMessage *message, void *data) { cache_process_state_changed (&e); } + /* see BGO#663992 */ + else if (!strncmp (e.type, "focus", 5) && e.source->states) + e.source->states->states |= (1 << ATSPI_STATE_FOCUSED); _atspi_send_event (&e); |