Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-105042

a11y AT-SPI: Window-relative positions are wrong for dialogs, screen coordinates returned instead

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 6.2.6, 6.4.0 RC1, 6.5.0 Beta1
    • 6.5.0 Beta1
    • None
    • Linux/X11
    • 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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            smd Jan Arve
            michaelweghorn Michael Weghorn
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes