From: parente Date: Wed, 16 May 2007 13:43:57 +0000 (+0000) Subject: * registry.py: Fixed bug #438623, state change events missing X-Git-Tag: AT_SPI2_CORE_0_1_3~361 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=61cb83835f207fc010d2139094d9386423a92247;p=platform%2Fupstream%2Fat-spi2-core.git * registry.py: Fixed bug #438623, state change events missing git-svn-id: http://svn.gnome.org/svn/at-spi/trunk@927 e2bd861d-eb25-0410-b326-f6ed22b6b98c --- diff --git a/pyatspi/ChangeLog b/pyatspi/ChangeLog index 7cf0347..a36823d 100644 --- a/pyatspi/ChangeLog +++ b/pyatspi/ChangeLog @@ -1,3 +1,7 @@ +2007-05-16 Peter Parente + + * registry.py: Fixed bug #438623, state change events missing + 2007-05-10 Peter Parente * utils.py: Fixed bug #437528, StateSet equals diff --git a/pyatspi/registry.py b/pyatspi/registry.py index 396c721..2e387dc 100644 --- a/pyatspi/registry.py +++ b/pyatspi/registry.py @@ -612,12 +612,19 @@ class Registry(object): @param event: AT-SPI event @type event: L{event.Event} ''' + et = event.type try: # try to get the client registered for this event type - clients = self.clients[event.type.name] + clients = self.clients[et.name] except KeyError: - # client may have unregistered recently, ignore event - return + try: + # we may not have registered for the complete subtree of events + # if our tree does not list all of a certain type (e.g. + # object:state-changed:*); try again with klass and major only + clients = self.clients['%s:%s' % (et.klass, et.major)] + except KeyError: + # client may have unregistered recently, ignore event + return # make the call to each client for client in clients: try: