Commit db16f3e5 authored by Jan Arve Saether's avatar Jan Arve Saether Committed by Jan Arve Sæther
Browse files

Improve hit testing so that it works better with ignored items


The hit testing won't work very well with the upcoming patch that
changes which items that can be ignored.
(basically it doesn't consider the isAccessible flag,
so childAt_helper might return a node that was supposed to be ignored)

Earlier this was a sensible optimization in order to avoid too many heap
allocations and deallocations of interfaces, but these are cheap now, so
we can do it the do it the 'proper way' (i.e. before this patch we
didn't respect the a11y hierarchy as given by QAccessibleInterface
child() and parent(). This also uses the QAccessibleInterface::rect()
directly now instead of using the itemScreenRect() function, which
was shared between QAccessibleQuickWindow and QAccessibleQuickItem.

Since this changes the order of child interfaces to paint order (i.e.
second child interface is on top of first child interface), we need to
ensure that we hit test child interfaces in the correct order.
They should now always be processed with the last interface first, and
then return as soon as something is hit.

Change-Id: Ie951fc3b48b7affd9f7e98687a1cbbe008857d2a
Reviewed-by: default avatarFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>
parent d6661ca4
Showing with 57 additions and 85 deletions
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment