7c00ad4e9a
Before this patch the accessibility focus on a selected element could be drawn incorrectly after the screen orientation has changed. The reason for that is that wrong X and Y offsets were used for it. The offsets are used to take the sizes of different panels (like buttons and notifications bar) into account. Normally they are updated only when getNodeForView() is called and the whole accessibility info is reconstructed. However, when the screen orientation changes, we get some getNodeForVirtualViewId(selectedId) calls before the whole accessibility tree is recreated. This is when redrawing happens, and as I understand, this is an internal Android event, so we can't do much about it. The most straightforward fix for the problem would be to query the offsets also in each getNodeForVirtualViewId() call. However, offset calculation seems to be quite heavy operation, and getNodeForVirtualViewId can be called very often (esp. if we have a lot of UI elements). As a result, this fix can't be implemented. In this patch I came up with the second approach - once getNodeForView() is called, and it detects that the offsets have changed, we force re-focus of the currently selected element. This allows us to retain the offsets-caching mechanism. Fixes: QTBUG-93402 Pick-to: 6.3 6.2 5.15 Change-Id: Ic420afe1fe5e80fbdf91b2b2651f2daa71c6e44d Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> |
||
---|---|---|
.github/workflows | ||
bin | ||
cmake | ||
coin | ||
config.tests | ||
dist | ||
doc | ||
examples | ||
lib | ||
libexec | ||
mkspecs | ||
qmake | ||
src | ||
tests | ||
util | ||
.cmake.conf | ||
.gitattributes | ||
.gitignore | ||
.lgtm.yml | ||
.tag | ||
CMakeLists.txt | ||
conanfile.py | ||
config_help.txt | ||
configure | ||
configure.bat | ||
configure.cmake | ||
dependencies.yaml | ||
LICENSE.FDL | ||
LICENSE.GPL2 | ||
LICENSE.GPL3 | ||
LICENSE.GPL3-EXCEPT | ||
LICENSE.LGPL3 | ||
LICENSE.QT-LICENSE-AGREEMENT | ||
qt_cmdline.cmake | ||
sync.profile |