Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
6.5.0 Beta1
-
None
-
Debian testing, qtbase as of commit 38114b83250cc9b14069d41935fb8822475de45a + the pending fix from https://codereview.qt-project.org/c/qt/qtbase/+/422251 (v1) in place that fixes more general issues with window-relative coordinates
-
-
49c966bc85 (qt/qtbase/dev) 3e12229c67 (qt/qtbase/6.4) 3e12229c67 (qt/tqtc-qtbase/6.4) 49c966bc85 (qt/tqtc-qtbase/dev) 3167bb3558 (qt/tqtc-qtbase/6.2) fd5edcf6e8 (qt/qtbase/6.3) fd5edcf6e8 (qt/tqtc-qtbase/6.3)
Description
For elements inside of dialogs, querying the window-relative coordinates via AT-SPI does not actually return window-relative coordinates, but screen coordinates, even with the fix from https://codereview.qt-project.org/c/qt/qtbase/+/422251 in place.
Steps to reproduce:
1) build and run the "tabdialog" example from qtbase:
$ qtbase/examples/widgets/dialogs/tabdialog/tabdialog
2) move the window to a position other than the top-left of the screen, so that screen coordinates are different from window-relative coordinates
3) start Accerciser
4) navigate to the "Path:" label of the dialog in the accessibility treeview of the sample application
5) query/print the screen coordinates and window-relative coordinates of the label, e.g.
In [2]: acc.queryComponent().getPosition(pyatspi.component.XY_SCREEN)
Out[3]: (419, 597)
In [3]: acc.queryComponent().getPosition(pyatspi.component.XY_WINDOW)
Out[4]: (419, 597)
6) move the window around a bit
7) repeat step 5, e.g.:
In [4]: acc.queryComponent().getPosition(pyatspi.component.XY_SCREEN)
Out[5]: (473, 348)
In [5]: acc.queryComponent().getPosition(pyatspi.component.XY_WINDOW)
Out[6]: (473, 348)
Actual result:
The same value is always returned for screen coordinates as well as window-relative coordinates, even though the window is not located at the top left of the screen.
Expected result:
- in both, step 5) and 7), the positioned returned for `acc.queryComponent().getPosition(pyatspi.component.XY_WINDOW)` should be relative to the window, i.e. smaller than the value returned by `acc.queryComponent().getPosition(pyatspi.component.XY_SCREEN)`
- Window-relative coordinates should be the same in step 5 and 7. Only screen coordinates should change as the window is moved around.