summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/kernel')
-rw-r--r--src/widgets/kernel/qapplication.cpp22
-rw-r--r--src/widgets/kernel/qwidgetwindow_qpa.cpp10
2 files changed, 9 insertions, 23 deletions
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index ce57e2868d..2615ac891d 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -3014,34 +3014,14 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
// capture the current mouse/keyboard state
if(e->spontaneous()) {
- if (e->type() == QEvent::KeyPress
- || e->type() == QEvent::KeyRelease) {
- QKeyEvent *ke = static_cast<QKeyEvent*>(e);
- QApplicationPrivate::modifier_buttons = ke->modifiers();
- } else if(e->type() == QEvent::MouseButtonPress
+ if (e->type() == QEvent::MouseButtonPress
|| e->type() == QEvent::MouseButtonRelease) {
QMouseEvent *me = static_cast<QMouseEvent*>(e);
- QApplicationPrivate::modifier_buttons = me->modifiers();
if(me->type() == QEvent::MouseButtonPress)
QApplicationPrivate::mouse_buttons |= me->button();
else
QApplicationPrivate::mouse_buttons &= ~me->button();
}
-#if !defined(QT_NO_WHEELEVENT) || !defined(QT_NO_TABLETEVENT)
- else if (false
-# ifndef QT_NO_WHEELEVENT
- || e->type() == QEvent::Wheel
-# endif
-# ifndef QT_NO_TABLETEVENT
- || e->type() == QEvent::TabletMove
- || e->type() == QEvent::TabletPress
- || e->type() == QEvent::TabletRelease
-# endif
- ) {
- QInputEvent *ie = static_cast<QInputEvent*>(e);
- QApplicationPrivate::modifier_buttons = ie->modifiers();
- }
-#endif // !QT_NO_WHEELEVENT || !QT_NO_TABLETEVENT
}
#ifndef QT_NO_GESTURES
diff --git a/src/widgets/kernel/qwidgetwindow_qpa.cpp b/src/widgets/kernel/qwidgetwindow_qpa.cpp
index aa7ccfeb4f..4723901625 100644
--- a/src/widgets/kernel/qwidgetwindow_qpa.cpp
+++ b/src/widgets/kernel/qwidgetwindow_qpa.cpp
@@ -96,8 +96,14 @@ bool QWidgetWindow::event(QEvent *event)
// these should not be sent to QWidget, the corresponding events
// are sent by QApplicationPrivate::notifyActiveWindowChange()
case QEvent::FocusIn:
- case QEvent::FocusOut:
- return false;
+ case QEvent::FocusOut: {
+#ifndef QT_NO_ACCESSIBILITY
+ QAccessible::State state;
+ state.active = true;
+ QAccessibleStateChangeEvent ev(widget(), state);
+ QAccessible::updateAccessibility(&ev);
+#endif
+ return false; }
case QEvent::FocusAboutToChange:
if (QApplicationPrivate::focus_widget) {