summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel
diff options
context:
space:
mode:
authorKent Hansen <kent.hansen@nokia.com>2012-03-27 16:19:29 +0200
committerKent Hansen <kent.hansen@nokia.com>2012-03-27 19:22:48 +0200
commitd236fe2214340164bec4f34cb27dea4a634ee0de (patch)
treecda4ebbcc91717b37e5a2dbccb9ee46c2a1d3885 /src/widgets/kernel
parent2b17b0235b70f89d15d3b91a14c3297d38377f94 (diff)
parentcbc883da6910b3357a4e03d0e2dfa841da1a03e8 (diff)
Merge master into api_changes
Conflicts: src/corelib/global/qisenum.h src/dbus/qdbusconnection_p.h src/widgets/kernel/qwidget.cpp tests/auto/other/qaccessibility/tst_qaccessibility.cpp Change-Id: I85102515d5fec835832cc20ffdc5c1ba578bd01d
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) {