treeview's object:active-descendant-changed event triggered too early to have proper coordinates
Hello,
Steps to reproduce:
- let the attached script child_descendant_tracking_test.py run in a terminal
- start gtk3-demo or gtk4-demo
- press "end" key
- the script prints "position: -2147483648,-2147483648 size 178:21"
- press "up" key then "down" key
- the script prints for instance "position: 2728,1172 size 178:21"
What happens is that the script (which mimics the behavior of the focus tracking of a screen magnifier) gets the object:active-descendant-changed event from gtk, and uses the Component atspi interface to determine the coordinates of the child widget corresponding to it, only to get "out of screen" coordinates INT_MIN,INT_MIN, because the child widget is not actually visible yet. Of course, making the script wait a bit before looking at coordinates works around the issue, but that's really not a solution.
Gtk should send the object:active-descendant-changed event only after the child widget becomes visible somewhere on the screen, so that screen magnifiers can know which part of the screen should be shown.
Samuel