summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorAndre de la Rocha <andre.rocha@qt.io>2020-07-14 22:37:59 -0300
committerAndre de la Rocha <andre.rocha@qt.io>2020-07-15 08:39:54 -0300
commit5f3f23462e7990800b7d93daecd4ab8e895ef036 (patch)
treebcdac99aba94be4bbf8771a6fc45b51d8c18c4ed /src/widgets
parent53496e67f0b78645c6080e9218c7a36bc5a9d76d (diff)
Allow Windows accessibility backend to receive focus updates
The removed code no longer applies to the current Windows accessibility backend, and was causing it to miss focus change events when the application UI contained one or more widgets associated with native window handles, or when the Qt::AA_NativeWindows application attribute was set. This caused accessibility tools like Narrator to miss changes in the focused widget. Fixes: QTBUG-81862 Pick-to: 5.15 Change-Id: I6e42d09c54e9e1338fc4b103eba8a0b2c4309e7f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/kernel/qwidget.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index 01755e01c7..0eb929f600 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -6349,11 +6349,6 @@ void QWidget::setFocus(Qt::FocusReason reason)
QApplicationPrivate::setFocusWidget(f, reason);
#ifndef QT_NO_ACCESSIBILITY
-# ifdef Q_OS_WIN
- // The negation of the condition in setFocus_sys
- if (!(testAttribute(Qt::WA_WState_Created) && window()->windowType() != Qt::Popup && internalWinId()))
- //setFocusWidget will already post a focus event for us (that the AT client receives) on Windows
-# endif
// menus update the focus manually and this would create bogus events
if (!(f->inherits("QMenuBar") || f->inherits("QMenu") || f->inherits("QMenuItem")))
{