summaryrefslogtreecommitdiffstats
path: root/src/core/browser_accessibility_manager_qt.h
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2022-03-17 13:09:26 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-03-18 17:07:32 +0000
commita980cc295e8e1a7876ab4083cce93151d00162aa (patch)
tree8facca469d3e4fdac6891dec99ef91c345dc84ee /src/core/browser_accessibility_manager_qt.h
parente88338c87705351cc51f2eedc517033d80676add (diff)
Fix wrong assumption about focus in/out event delivery
In 2947d79d assumption was made that we never get focus in event for popup reason. Unfortunately this is not true as simply creating window menu and switching between webengineview will trigger the issue. Moreover, focus in and out events with popup reason do not mean change of focus, as in qtbase: if (QWidget *fw = active_window->focusWidget()) { if (fw != QApplication::focusWidget()) { fw->setFocus(Qt::PopupFocusReason) } else { QFocusEvent e(QEvent::FocusIn, Qt::PopupFocusReason); QCoreApplication::sendEvent(fw, &e); } } Therefore it is safe to ignore focus in/out events with popup reason. Note that the fact that ASSERT got not triggered for context menu is due to another race condition issue in qquick event stack delivery. This commit amends 2947d79d8210a7ae4ce2bc02e058628e66011be3. Fixes: QTBUG-101706 Change-Id: I3e761fe5d8054aed72461eba7981c69755877d1b Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io> (cherry picked from commit 0625a1e16b8698d9c344548e4e929fb385b6a542) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/core/browser_accessibility_manager_qt.h')
0 files changed, 0 insertions, 0 deletions