summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2009-05-08 13:55:06 (GMT)
committerBradley T. Hughes <bradley.hughes@nokia.com>2009-05-08 13:55:06 (GMT)
commit5d7e624593172a9901d0bb44d57fe6e7697fd113 (patch)
tree10ff461440eb8c8a6be0f02188afa4a46d055c56 /src/gui/kernel
parent711701da5cc958bb44cd5ff2d6562cfca1f7eb85 (diff)
downloadQt-5d7e624593172a9901d0bb44d57fe6e7697fd113.zip
Qt-5d7e624593172a9901d0bb44d57fe6e7697fd113.tar.gz
Qt-5d7e624593172a9901d0bb44d57fe6e7697fd113.tar.bz2
set qt_tabletChokeMouse to true whenever ANY touch event was accepted
this makes sure we always get touch events, and the don't drop out seemingly randomly.
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qapplication_win.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp
index 60c6fd7..723a3b4 100644
--- a/src/gui/kernel/qapplication_win.cpp
+++ b/src/gui/kernel/qapplication_win.cpp
@@ -4175,6 +4175,7 @@ bool QApplicationPrivate::translateTouchEvent(const MSG &msg)
return false;
bool returnValue = false;
+ qt_tabletChokeMouse = false;
QHash<QWidget *, QTouchEvent>::ConstIterator it = widgetsNeedingEvents.constBegin();
const QHash<QWidget *, QTouchEvent>::ConstIterator end = widgetsNeedingEvents.constEnd();
@@ -4194,7 +4195,7 @@ bool QApplicationPrivate::translateTouchEvent(const MSG &msg)
widget->setAttribute(Qt::WA_AcceptedTouchBeginEvent);
bool res = QApplication::sendSpontaneousEvent(widget, &touchEvent)
&& touchEvent.isAccepted();
- returnValue = returnValue || (qt_tabletChokeMouse = res);
+ returnValue = returnValue || (qt_tabletChokeMouse = qt_tabletChokeMouse || res);
break;
}
case QEvent::TouchEnd:
@@ -4206,8 +4207,6 @@ bool QApplicationPrivate::translateTouchEvent(const MSG &msg)
if (widget->testAttribute(Qt::WA_AcceptedTouchBeginEvent)) {
(void) QApplication::sendSpontaneousEvent(widget, &touchEvent);
qt_tabletChokeMouse = true;
- } else {
- qt_tabletChokeMouse = false;
}
returnValue = returnValue || qt_tabletChokeMouse;
break;