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

a11y AT-SPI: incorrect handling of window-relative coords for "GetOffsetAtPoint" (text interface)



    • Bug
    • Resolution: Done
    • P2: Important
    • 6.2.6, 6.4.0 RC1, 6.5.0 Beta1
    • 6.5.0 FF
    • None
    • Debian testing, self-compiled qtbase from the dev branch as of commit 38114b83250cc9b14069d41935fb8822475de45a + the two above-mentioned Gerrit changes applied
    • Linux/X11
    • fa0e24b641 (qt/qtbase/dev) 858e08a101 (qt/qtbase/6.4) 858e08a101 (qt/tqtc-qtbase/6.4) fa0e24b641 (qt/tqtc-qtbase/dev) a828564bd6 (qt/tqtc-qtbase/6.2) 99cc8bc61f (qt/qtbase/6.3) 99cc8bc61f (qt/tqtc-qtbase/6.3)


      Window-relative coordinates passed to the "GetOffsetAtPoint" method of the AT-SPI text interface are handled incorrectly.

      Note: This is even with the following pending fixes for other issues in place (as was the case when testing this, since there are even more issues to run into otherwise):




      Steps to reproduce (s.a. attached screencast):

      1) start Accerciser (https://wiki.gnome.org/Apps/Accerciser)

      2) build and run the "textedit" example from qtbase:
      $ qtbase/examples/widgets/richtext/textedit/textedit

      3) navigate to the example's text node in Accerciser's a11y treeview of the application
      4) move the window to the top-left of the (first) screen
      5) type the following into Accerciser's IPython console to check the result of calling the "GetOffsetAtPoint" AT-SPI method on the selected item. In the screencast::

      In [10]: acc.queryText().getOffsetAtPoint(300, 300, pyatspi.component.XY_WINDOW)

      Out [11]: 835

      6) move the window somewhere else

      7) repeat step 5


      Actual result:

      A different value than in step 5 is returned. Here:

      In [11]: acc.queryText().getOffsetAtPoint(300, 300, pyatspi.component.XY_WINDOW)

      Out [12]: -1

      Expected result:

      Since window-relative coordinates have been specified (__pyatspi.component.XY_WINDOW), the result should be independent of the screen position of the window, i.e. the same result should be returned in steps 5) and 7). Only screen coordinates should change as the window is moved around, windows-relative coordinates shouldn't.


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



            michaelweghorn Michael Weghorn
            michaelweghorn Michael Weghorn
            0 Vote for this issue
            1 Start watching this issue



              Gerrit Reviews