Notify a11y framework of FocusChanges for QGraphicsObject
(cherry picked from commit 1b5cb7865eb8b48a2721f9b9c3ccd2fb25f8175d) Reviewed-by: Frederik Gladhorn (cherry picked from commit 9a02ad74693f1835745ec20798b353f7e62bcd5e)
This commit is contained in:
parent
26acac4052
commit
0154343608
@ -245,6 +245,10 @@
|
||||
#include <QtGui/qtransform.h>
|
||||
#include <QtGui/qinputcontext.h>
|
||||
#include <QtGui/qgraphicseffect.h>
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
# include <QtGui/qaccessible.h>
|
||||
#endif
|
||||
|
||||
#include <private/qapplication_p.h>
|
||||
#include <private/qobject_p.h>
|
||||
#ifdef Q_WS_X11
|
||||
@ -837,6 +841,14 @@ void QGraphicsScenePrivate::setFocusItemHelper(QGraphicsItem *item,
|
||||
if (item)
|
||||
focusItem = item;
|
||||
updateInputMethodSensitivityInViews();
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
if (focusItem) {
|
||||
if (QGraphicsObject *focusObj = focusItem->toGraphicsObject()) {
|
||||
QAccessible::updateAccessibility(focusObj, 0, QAccessible::Focus);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (item) {
|
||||
QFocusEvent event(QEvent::FocusIn, focusReason);
|
||||
sendEvent(item, &event);
|
||||
|
Loading…
Reference in New Issue
Block a user