Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- # 1. Launch gtk3-demo and this listener
- # 2. Down Arrow several times in the tree on the left
- # 3. Up Arrow several times in the tree on the left
- # 4. Down Arrow several times in the tree on the left
- #
- # Results: As soon as step 3 gets performed, items claim to not be selected
- import pyatspi
- def listener(e):
- newDescendant = e.any_data
- state = newDescendant.getState()
- print "new descendant: %s is selected: %s" % \
- (newDescendant.name, bool(state.contains(pyatspi.STATE_SELECTED)))
- pyatspi.Registry.registerEventListener(listener, "object:active-descendant-changed")
- pyatspi.Registry.start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement