diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 60f20644c7..231fc261d7 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -6443,6 +6443,10 @@ void QWidget::setFocus(Qt::FocusReason reason) // 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 +# ifdef Q_OS_UNIX + // menus update the focus manually and this would create bogus events + if (!(f->inherits("QMenuBar") || f->inherits("QMenu") || f->inherits("QMenuItem"))) # endif QAccessible::updateAccessibility(f, 0, QAccessible::Focus); #endif